According to http://malsup.com/jquery/form/#validation you can use the beforeSubmit parameter to provide a callback that returns true or false.
In this callback, just use the plugin method .valid () described here http://jqueryvalidation.org/valid
$(document).ready(function() { // jQuery Validation Plugin $("#myForm1").validate(); // jQuery form Plugin var options = { target: '#output1', // target element(s) to be updated with server response beforeSubmit: validate, // pre-submit callback success: showResponse // post-submit callback }; // bind form using 'ajaxForm' $('#myForm1').ajaxForm(options); }); // Return validation status from jQuery validate plugin. function validate(formData, jqForm, options) { return $('#myForm1').valid(); }
Wintermute
source share