加载中…
个人资料
iPan
iPan
  • 博客等级:
  • 博客积分:0
  • 博客访问:1,058,509
  • 关注人气:234
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

jqueryvalidate如何校验多个相同name

(2022-04-10 13:53:19)
标签:

jquery

validate

分类: 前端开发
当前页面加入:
if ($.validator) {
           $.validator.prototype.elements = function () {
               var validator = this,
                 rulesCache = {};
               return $(this.currentForm)
               .find("input, select, textarea")
               .not(":submit, :reset, :image, [disabled]")
               .not(this.settings.ignore)
               .filter(function () {
                   if (!this.name && validator.settings.debug && window.console) {
                       console.error("%o has no name assigned", this);
                   }
                   rulesCache[this.name] = true;
                   return true;
               });
           }

参考:

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有