Josh Nathanson schrieb:
Steve, odd that I was just helping another poster named Fabien with this yesterday. Here's the way: $("#myform").submit(function() {

    // do your extra form stuff here
var v = $(this).validate(validateOptionsHere);

if (v.form()) // runs form validation and returns true if successful
         this.submit();     // form will be submitted
    else
        alert('Error on form validation!')
        return false;
});
The ugly part: The event handlers from the validation plugin are now added each time the form is submitted, not an ideal solution. So far I assumed that anyone using the submitHandler callback would submit the form via ajax. Obviously that isn't true. I'll try to find a better solution for that.

-- Jörn

Reply via email to