[jQuery Validation / Validate plugin] How to tell if validation has been run?
Hi there,
I have a field ("A") that I'm displaying and hiding based on the value of another field ("B")
If field A is displayed, it must contain a value. When it is programatically hidden, its value is blanked out.
My issue is this: when I hide the field, I want to run the .valid() method on it, so that it clears any error that may have been displayed if it failed validation.
However, I don't want to run the .valid() method on it before the form is validated, because that may prematurely display the error message before the form is submitted.
Is it possible to determine whether the form has been validated, and only if it has (successfully or unsuccessfully), run the .valid() method on field A?
Thanks,
Jamie