backbone.validation
backbone.validation copied to clipboard
A validation plugin for Backbone.js that validates both your model as well as form input
This PR is a solution to https://github.com/thedersen/backbone.validation/issues/211. It allows pre-validating a set of attributes against itself or another set of attributes. ``` javascript // Validate a hash of attributes against...
In preValidate() the computed object should not be just attributes, it should also include the attributes passed to preValidate() as it does with set() or save().
When you call preValidate the computedState doesn't include the attributes passed to preValidate, but rather the model attributes. This differs from the regular validate functionality which means validation functions that...
Referencing Backbone.Validation generates a compiler error. Is there a definition file available?
@chiefGui a [bug fix](https://github.com/thedersen/backbone.validation/commit/1b949) was merged back in May, but it doesn't look like that fix made it into the dist files distributed as v0.11.5. Could you please update the...
Reduces amount of files consumer gets when `npm install`ing. Before: http://hastebin.com/wacequlono.sh After: http://hastebin.com/karavebiko.sh I also added `phantomjs` to devDeps. I expect `npm install && npm test` to not explode because...
I have an array of custom validator functions and tried this in the model: ``` validation: { name: [validate.required, validate.user.name] } ``` But it only works if I do this:...
This is a need I have in one of the app I'm currently developing. Basically, my `User` model has a `permissions` attribute, which is an array. I need to be...
I have done some debugging and it is due to _.each prioritising array. Reference: jashkenas/underscore#2407