I have a form with a custom button that submits it via ajax (not a real submit button).
I’m using jquery-validation to validate the form, and running validate().checkForm() to validate it.
My question is – why don’t the error messages on the specific fields appear when I do this? They appear all right when I’m using a standard submit button.
Edit: My example doesn’t include the ajax submission, but just pretend it’s there.
Because validate is listening for the submit event.
If you add
$("form").submit();inside the click event then it is fired.http://jsbin.com/avuhed/edit#javascript,html,live