JQuery.validator插件使用 首先给变量validator赋值 var validator =$('#test').validate({validate构造 }); 接着调用 $('#test').valid() 会使用上面的验证器验证。