Skip to content


Subversion checkout URL

You can clone with
Download ZIP

range validator

thedersen edited this page · 2 revisions
var SomeModel = Backbone.Model.extend({
  validation: {
    age: {
      range: [1, 10]
  • number lower than first value is invalid
  • number equal to first value is valid
  • number equal to last value is valid
  • number higher than last value is invalid
  • number in range 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.