浏览代码

handle case where a field is removed after the bootstrap validation but before the form is submitted. Treat missing fields as disabled.

Without this fix an exception is thrown ending all further validation.
Patrick Moore 11 年之前
父节点
当前提交
f1e4b75d50
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/js/bootstrapValidator.js

+ 1 - 1
src/js/bootstrapValidator.js

@@ -377,7 +377,7 @@
         isValid: function() {
             var field, validatorName;
             for (field in this.results) {
-                if (!this.options.fields[field]['enabled']) {
+                if (this.options.fields[field] == null || !this.options.fields[field]['enabled']) {
                     continue;
                 }