1.这个属性导致表单多个相同name的标签只有一个会被验证;所以注释掉了

elements: function () {
                var validator = this,
                    rulesCache = {};

                // select all valid inputs inside the form (no submit or reset buttons)
                return $(this.currentForm)
                .find("input, select, textarea,button")
                .not(":submit, :reset, :image, [disabled]")
                .not(this.settings.ignore)
                .filter(function () {
                    !this.name && validator.settings.debug && window.console && console.error("%o has no name assigned", this);

                    // select only the first element for each name, and only those with rules specified
                    //if (this.name in rulesCache || !validator.objectLength($(this).rules()))
                    //    return false;

                    //rulesCache[this.name] = true;
                    if (!validator.objectLength($(this).rules()))
                        return false;

                    return true;
                });
            },

2.现象:标签没有id也不会被验证

相关文章:

  • 2021-05-26
  • 2021-08-18
  • 2021-05-27
  • 2022-12-23
  • 2021-05-06
  • 2022-12-23
猜你喜欢
  • 2021-07-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-15
  • 2022-01-11
相关资源
相似解决方案