Link to home
Create AccountLog in
Avatar of Robert Granlund
Robert GranlundFlag for United States of America

asked on

jQuery Cancel Validation

I have a jQuery function that validates a bunch of form fields when the submit button is clicked.  I also have a button on the page that empties the form if a checkbox is checked.  However, If I click the submit button and validation clicks in, then instead of going through the validation and filling in the fields, I just click on the checkbox to empty the form, it won't empty the form until I fill in a ll of the validation fields.  Is there a way to cancel validation once it has been initiated?
Avatar of Tom Beck
Tom Beck
Flag of United States of America image

Is this validate.js? Use resetForm() on a validate instance of the form.
Avatar of Robert Granlund

ASKER

Can I place that on the submit button, that is used to update the form/Delete the form fields?  If so, how?
ASKER CERTIFIED SOLUTION
Avatar of Tom Beck
Tom Beck
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer