backbone.validation icon indicating copy to clipboard operation
backbone.validation copied to clipboard

preValdiation doesn't pass the computed state to the validation functions

Open gmmorris opened this issue 9 years ago • 2 comments

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 depend on multiple attributes break (true, not an idea situation anyway, but sometime you need that and the behaviour should be uniform in both usages).

gmmorris avatar Aug 28 '15 09:08 gmmorris

Made a fix and submitted a pull request (https://github.com/thedersen/backbone.validation/pull/303)

I wasn't sure what your versioning and releasing procedure is, so I haven't changed the version - let me know if you wish for me to bump the minor version.

gmmorris avatar Aug 28 '15 09:08 gmmorris

This is a serious problem, but the pull request is almost a year old, and nobody has replied to it!

austing avatar Apr 26 '16 10:04 austing