I would like to run a function if my form has completely validated according to my defined rules (Not shown below).
The below code doesn't work as I would like it to, most certainly depending on the fact that the success function is called on a per-input basis and not globally for the complete form .
Are there any workarounds to get a global success callback that runs when the complete form validates properly?
$("#myForm").validate({
success: function(label) {
if ($("#myForm").valid()) {
runMyFunction();
}
},
rules: {
//...
}
});