Skip to content
thedersen edited this page Dec 26, 2011 · 1 revision
var SomeModel = Backbone.Model.extend({
  validation: {
    country: {
	  oneOf: ['Norway', 'Sweeden']
	}
  }
});
  • value is not one of the values in the arraye is invalid
  • value is one of the values in the array is valid
  • is case sensitive
  • when required is not specified null is invalid
  • when required is not specified undefined is invalid
  • when required:false undefined is valid
  • when required:false null is valid
  • when required:true null is invalid
  • when required:true undefined is invalid
Clone this wiki locally