I am using the jQuery validation plugin to validate a form. Do you know how the liability can be applied to the first successful field?
I have tried. Function using the following functions (this is done after clicking the user's 'Submit'):
if ($ ('$ form1'). Validate (). Form ( ) == incorrect) {formValid = false; }
However, it appears that the above code does not attempt verification again so that the fields that are already verified successfully (i.e. That is
The reason for re-verification of the first successful areas is because they rely on remote verification, and the result (success or failure) can be changed between the user except the field, and submit Click on (This applies to a 'username' field).
If it affects the answer then I have several forms to validate (for simplicity, I refer only to 'form1' in the above code snippet). Thanks in advance for any advice,
Rob
$ ("# form1: input".) RemoveData ("PREVIOUSVALUE"); // call now. Valid ()
It insists that the value has changed (we need to verify again) true
:
// This code is in the verification plugin for remote: var previous = this.previousValue (element); If (last. Old! == value) {// This is usually wrong because it has not been changed
, if there are only specific fields that need to be validated again, Like you said username, you might want to narrow the code to "$" ("#Form1: Input"). Selector which field you want, make it a little more efficient.
Comments
Post a Comment