Browse Source

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 years ago
parent
commit
f1e4b75d50
1 changed files with 1 additions and 1 deletions
  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;
                 }