Browse Source

Fixes #1055

Field error events not triggered properly with verbose = false

Signed-off-by: Maarten Troonbeeckx <maarten@uni-t.be>
Maarten Troonbeeckx 11 years ago
parent
commit
a49e36a6a2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/js/bootstrapValidator.js

+ 1 - 1
src/js/bootstrapValidator.js

@@ -735,7 +735,7 @@ if (typeof jQuery === 'undefined') {
                 $field.trigger($.Event(this.options.events.fieldSuccess), data);
             }
             // If all validators are completed and there is at least one validator which doesn't pass
-            else if (counter[this.STATUS_NOT_VALIDATED] === 0 && counter[this.STATUS_VALIDATING] === 0 && counter[this.STATUS_INVALID] > 0) {
+            else if ((counter[this.STATUS_NOT_VALIDATED] === 0 || !this._isVerboseField(field)) && counter[this.STATUS_VALIDATING] === 0 && counter[this.STATUS_INVALID] > 0) {
                 // Add to the list of invalid fields
                 this.$invalidFields = this.$invalidFields.add($field);