ソースを参照

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;
                 }