You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not exactly sure, but I think the submitSuccess fires off multiple times.
$("button").click(function(){$("input","#form").jqBootstrapValidation({submitSuccess: function(booking,e){alert("This is an alert");e.preventDefault();}});});
In that code sample, the alert will go off according to the number of input text having an error.
For example:
There are three required inputs
Deliberately miss one and let the validation runs
When submitting the form, you'll get two alerts (you should get only 1)
Note: preventDefault is there since I am using AJAX to submit the form, and I have multiple forms in a page.
The text was updated successfully, but these errors were encountered:
I'm not exactly sure, but I think the submitSuccess fires off multiple times.
In that code sample, the alert will go off according to the number of input text having an error.
For example:
Note:
preventDefault
is there since I am using AJAX to submit the form, and I have multiple forms in a page.The text was updated successfully, but these errors were encountered: