Browse Source

Merge pull request #711 from talberti/patch-1

Keep disabled validators VAILD
Phuoc Nguyen 11 years ago
parent
commit
7d53504abd
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/js/bootstrapValidator.js

+ 4 - 1
src/js/bootstrapValidator.js

@@ -774,9 +774,12 @@
 
                     // Don't validate field if it is already done
                     var result = $field.data('bv.result.' + validatorName);
-                    if (result === this.STATUS_VALID || result === this.STATUS_INVALID || validators[validatorName].enabled === false) {
+                    if (result === this.STATUS_VALID || result === this.STATUS_INVALID) {
                         this._onFieldValidated($field, validatorName);
                         continue;
+                    }else if (validators[validatorName].enabled === false) {
+                        this.updateStatus(updateAll ? field : $field, this.STATUS_VALID, validatorName);
+                        continue;                        
                     }
 
                     $field.data('bv.result.' + validatorName, this.STATUS_VALIDATING);