I have a js code where it is validating a form using jquery validations. and after that it is calling ajax.
$('.form').validate({
rules: {
----
}
});
$('#submit').click(function() {
$.ajax(url,{
data:data,
success:onSuccess,
error:onError,
type:POST
});
return FALSE;
});
onSuccess and onError are simple functions. url is predefined
But with this code its not entering into validations and directly calling ajax whatever might be the case.