bypass form validation if submitted by $('#myForm').submit()

How to bypass the form validation when the form is submitted by $(’#myForm’).submit() ?

But if the form is submitted by clicking on submit button, it still need the validation.

Thanks

This topic can help you

The validateOnSubmit and validateOnChange will be true in my form. I need the ajax validation and submit validation

when the form field value changes or the submit button is clicked.

Only when the form is submitted by $(’#myForm’).submit(), I need it to bypass all the validations.

Resolved. I updated a hidden field before form.submit() and then check the field before running validation.