Avatar of Robert Granlund
Robert Granlund
Flag 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?
jQueryJavaScript

Avatar of undefined
Last Comment
Tom Beck

8/22/2022 - Mon
Tom Beck

Is this validate.js? Use resetForm() on a validate instance of the form.
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
Tom Beck

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes