I'm using the .validity jquery plugin (validity.thatscaptaintoyou.com/), and am trying to also use a .submit, but I'm not sure how to prevent both from executing simultaneously. Basically, I don't want to .submit to execute unless the validity passes.
Validity Check:
$("#myform").validity(function() {
$("#first_name").require();
$("#last_name").require();
$("#email").require().match('email', 'Please enter a valid e-mail address');
});
Sample .submit
$('#myform').submit(function(event) {//Execute only if validity passed}