Reputation: 4818
I am trying to validate my form using jquery.validate plugin. It works fine, but when I am trying to submit using form id, it submits invalid form.
Now I validate using:
$("#login_form").validate();
The form id is:
<form role="form" method = "POST" id="login_form"> ... </form>
Now, if validation is not complete, I get an alert using this function:
("#login_form").submit(
function()
{
alert("Please submit");
}
);
I think, I should not get alert unless I validate my form completely. Please help me to solve this.
Upvotes: 0
Views: 7274