-
Notifications
You must be signed in to change notification settings - Fork 300
rangeLength validator
thedersen edited this page Dec 26, 2011
·
1 revision
var SomeModel = Backbone.Model.extend({
validation: {
password: {
rangeLength: [6, 100]
}
}
});
- string with length equal to last value is valid
- string with length equal to first value is valid
- string with length shorter than first value is invalid
- string with length longer than last value is invalid
- string with length within range 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