Reputation: 39
I am using the jQquery validation plugin and I want to execute another function after validation based on the validation result.
$('#profileForm').validate({
submitHandler: function() {},
errorPlacement: function(error, element) {},
success: function(label, element) {}
})
How to bind another function that will execute every time after validation?
Upvotes: 0
Views: 96
Reputation: 16505
wouldn't
$('#profileForm').validate({
submitHandler: function() {
/** handle submit stuff **/
callSomeFx();
},
…
});
just do that?
You could define another function like so:
function onSubmit(){}
and set this as »submitHandler« to the .validate()
configuration.
Upvotes: 1