6、 // do other stuff for a valid form 专业知识整理分享WORD格式可编辑 form.submit(); } }) $(".selector").validate({submitHandler:function(form){//dootherstuffforavalidformform.submit();}})[3] invalidHandler 类型:Callback 说明:当未通过验证的表单提交时,可以在该回调函数中处理一些事情。该回调函数有两个
7、参数:第一个为一个事件对象,第二个为验证器(validator)$(".selector").validate({ invalidHandler: function(form, validator) { var errors = validator.numberOfInvalids(); if (errors) { var message = errors == 1 ? 'You missed 1 field. It has been highlight
8、ed' : 'You missed ' + errors + ' fields. They have been highlighted'; $("div.error span").html(message);