Skip to content

minLength validator

thedersen edited this page Dec 26, 2011 · 1 revision
var SomeModel = Backbone.Model.extend({
  validation: {
    password: {
	  minLength: 8
	}
  }
});
  • string with length equal to minLength is valid
  • string with length greater than minLength is valid
  • 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 undefined is invalid
  • when required:true null is invalid
Clone this wiki locally