Skip to content
thedersen edited this page Dec 26, 2011 · 2 revisions
var SomeModel = Backbone.Model.extend({
  validation: {
    age: {
	  min: 1
	}
  }
});
  • non numeric value is invalid
  • number lower than min is invalid
  • number equal to min is valid
  • number greater than min is valid
  • numeric string values are treated as numbers
  • when required is not specified null is invalid
  • when required is not specified undefined is invalid
  • when required:false null is valid
  • when required:false undefined is valid
  • when required:true null is invalid
  • when required:true undefined is invalid
Clone this wiki locally