validation默认不会对hidden元素进行验证的,我们得自己设置一下ignore: “”,很简单吧,代码如下:
$("#fyform").validate({ ignore: "",//不验证的元素 rules:{ wcname:"required", wcmp:"required", wcaddress:"required", wccompany:"required", wclogo:"required" }, messages:{ wcname:"请输入姓名", wcmp:"请输入联系方式", wcaddress:"请输入地址", wccompany:"请输入企业信息", wclogo:"请上传logo" },