Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

length validator

thedersen edited this page · 1 revision
var SomeModel = Backbone.Model.extend({
  validation: {
    postalCode: {
      length: 4
    }
  }
});
  • string with length shorter than length is invalid
  • string with length longer than length is invalid
  • string with length equal to length is valid
  • when required is not specified undefined is invalid
  • when required is not specified null is invalid
  • when required:false null is valid
  • when required:false undefined is valid
  • when required:true undefined is invalid
  • when required:true null is invalid
Something went wrong with that request. Please try again.