I want to dynamically change the rules for a validator, turning a set of them on or of when various checkboxes are enabled or disabled.
I know I can use the .rules method on the elements but for various reasons I want to keep my rules as a Javascript object literal. So I decided to reinitialise. This didn't work as $("form").data() was persisting my validator rules.
Regardless if my usage is optimal or not, I would think that when reinitialising the validator on a given element the old validation rules should be discarded. I'm now doing $("form").data().validator = null.
Is this a bug?
David.