[jQuery] how to turn validator on/off with a form?

[jQuery] how to turn validator on/off with a form?


My forms can be in either 'view' mode or 'edit' mode.
When in view mode, I do not want the validator to kick in.
When in edit mode, I want it to kick in.
A form can change from view --> edit and back any number of times once
it has been loaded.
It appears that the validator plugin caches settings, so once the
first $(...).validate() has been done, subsequent ones simply re-use
the cached validation parameters.
I'd like to be able to either
1) enable/disable the validator at will or
2) be able to call is like this $
(this).validate( { rules: {} } ); to disable it, and
like this $
(this).validate( myRules ); to enable it.
Currently, I do this
$(this).data('validator', null);
in order to force to ditch its cache.
I am not comfortable with this, as I rely on an internal mechanism of
the validator, which may change in the future.
Is there a simpler way that I have missed?
Cheers,
Nick