I'm using asp .net mvc 4 and I have a html form using ajax validation.
I use this javascript code to know if the form is not valid. This code works.
$('#form').bind('invalid-form.validate', function () {
alert("error");
return false;
});
But I cannot find a javascript callback for success ?
I tried :
$('#form').bind('valid-form.validate', function () {
alert("success");
});
or
$('#form').validate({
invalidHandler:
function (form, validator) {
alert('error');
},
rules: function (form, validator) {
alert('success ');
}
});
But I never get the success alert. Thanks for your help.