Address issue #28: introduce "star validation" for freeform validating
See issue #28.
@taivo would you have an example of this in use?
@chikamichi , at the time of those checkins, my main usecase was for Parse.com's Parse.Object. Parse.com is a mobile backend that builds upon an older fork of Backbone so their Parse.Object is essentially Backbone.Model with a few customizations like the Parse.Object.validate() method that checks a few special fields. For my usecase, I wanted a way to call the prebuilt validate function with backbone-validator
As I understood it, backbone-validator automates validation work for individual fields but doesn't have an explicit mechanism to validate relationships among fields, e.g., requires minVal <= maxVal. In my previous life, I was a Django developer so my thinking regarding validation is somewhat inline with that framework: individual fields are validated, then the model as a whole is also validated.
To use this, just specify '*' as a key in your validation specs, and a function as the value.
Ok, it makes sense. I must say I like it. :+1: from a user.