Knockout-Validation
Knockout-Validation copied to clipboard
When adding a rule, use 'peek' to check the existing rules.
trafficstars
This is so that any encapsulating subscriptions won't fire if the rules change.
See #594.
If I'm right in thinking that addRule does not need to be re-processed if observable.rules() changes, then the peek used in this PR is probably more appropriate. As suggested by @mbest.
Thanks @petemill @mbest. I'm going to merge this but after I make some tests against KO 3.4 to and see if there are any other related issues.
Merged into v2.1.0 branch. The PR will close itself when merged into master. Thanks for your contribution.
Fixes #594