Browse Source

Small fix

nghuuphuoc 11 years ago
parent
commit
12fe3ed2a2

+ 3 - 1
dist/js/bootstrapValidator.js

@@ -162,7 +162,9 @@
 
 
             // Prepare the feedback icons
             // Prepare the feedback icons
             // Available from Bootstrap 3.1 (http://getbootstrap.com/css/#forms-control-validation)
             // Available from Bootstrap 3.1 (http://getbootstrap.com/css/#forms-control-validation)
-            if (this.options.feedbackIcons) {
+            if (this.options.feedbackIcons
+                && this.options.feedbackIcons.validating && this.options.feedbackIcons.invalid && this.options.feedbackIcons.valid)
+            {
                 $parent.addClass('has-feedback');
                 $parent.addClass('has-feedback');
                 var $icon = $('<i/>').css('display', 'none').addClass('form-control-feedback').insertAfter($(fields[fields.length - 1]));
                 var $icon = $('<i/>').css('display', 'none').addClass('form-control-feedback').insertAfter($(fields[fields.length - 1]));
                 // The feedback icon does not render correctly if there is no label
                 // The feedback icon does not render correctly if there is no label

File diff suppressed because it is too large
+ 1 - 1
dist/js/bootstrapValidator.min.js


+ 3 - 1
src/js/bootstrapValidator.js

@@ -161,7 +161,9 @@
 
 
             // Prepare the feedback icons
             // Prepare the feedback icons
             // Available from Bootstrap 3.1 (http://getbootstrap.com/css/#forms-control-validation)
             // Available from Bootstrap 3.1 (http://getbootstrap.com/css/#forms-control-validation)
-            if (this.options.feedbackIcons) {
+            if (this.options.feedbackIcons
+                && this.options.feedbackIcons.validating && this.options.feedbackIcons.invalid && this.options.feedbackIcons.valid)
+            {
                 $parent.addClass('has-feedback');
                 $parent.addClass('has-feedback');
                 var $icon = $('<i/>').css('display', 'none').addClass('form-control-feedback').insertAfter($(fields[fields.length - 1]));
                 var $icon = $('<i/>').css('display', 'none').addClass('form-control-feedback').insertAfter($(fields[fields.length - 1]));
                 // The feedback icon does not render correctly if there is no label
                 // The feedback icon does not render correctly if there is no label