I'm currently using validationEngine to validate a form before submitting it;
add-on
Everything works smoothly except when I create my own submit event handler for the form.
For example,
<form id="form" action="controller/action" method="post"></form>
$('#form').submit(function() {
$.ajax({
url: form.attr('action'),
type: form.attr('method'),
success: function (response) {
success(response);
}
});
});
The validation is triggered, but the form gets submitted regardless. I have also attempted to check the returned value with:
alert($("#formUpdStoringSettings").validationEngine('validate'));
It always returns true for forms and false for fields, indicating that the validation is successful.
Is there any workaround for this issue as I must retain my custom submit event?