表单字段必填校验
$(\"#searchForm\").validate({rules:{字段: required},messages:{字段: \"提示信息\";}});
根据条件判断是否必填
通过rules()方法,移除必填校验;
function(条件){$(\"#id\").rules(\'remove\',\'required\');}
$(\"#searchForm\").validate({rules:{字段: required},messages:{字段: \"提示信息\";}});
通过rules()方法,移除必填校验;
function(条件){$(\"#id\").rules(\'remove\',\'required\');}