ソースを参照

#30: Hide the error block containers before validating

nghuuphuoc 12 年 前
コミット
da903e16ea

+ 3 - 0
CHANGELOG.md

@@ -1,5 +1,8 @@
 # Change Log
 
+v0.2.1
+* #30: Hide the error block containers before validating
+
 v0.2.0 (2013-10-21)
 * #9: Add ```creditCard``` validator
 * #18: Add ```different``` validator

+ 1 - 1
dist/css/bootstrapValidator.min.css

@@ -1,5 +1,5 @@
 /**
- * BootstrapValidator v0.2.0 (http://github.com/nghuuphuoc/bootstrapvalidator)
+ * BootstrapValidator v0.2.1 (http://github.com/nghuuphuoc/bootstrapvalidator)
  *
  * A jQuery plugin to validate form fields. Use with Bootstrap 3
  *

+ 2 - 2
dist/js/bootstrapValidator.js

@@ -1,5 +1,5 @@
 /**
- * BootstrapValidator v0.2.0 (http://github.com/nghuuphuoc/bootstrapvalidator)
+ * BootstrapValidator v0.2.1 (http://github.com/nghuuphuoc/bootstrapvalidator)
  *
  * A jQuery plugin to validate form fields. Use with Bootstrap 3
  *
@@ -155,7 +155,7 @@
                 helpBlock = $parent.find('.help-block');
 
             if (helpBlock.length == 0) {
-                var $small = $('<small/>').addClass('help-block').appendTo($parent);
+                var $small = $('<small/>').addClass('help-block').css('display', 'none').appendTo($parent);
                 $field.data('bootstrapValidator.error', $small);
 
                 // Calculate the number of columns of the label/field element

ファイルの差分が大きいため隠しています
+ 2 - 2
dist/js/bootstrapValidator.min.js


+ 1 - 1
package.json

@@ -13,5 +13,5 @@
     "grunt-contrib-cssmin": "~0.6.2",
     "grunt-contrib-copy": "~0.4.1"
   },
-  "version": "0.2.0"
+  "version": "0.2.1"
 }

+ 1 - 1
src/js/bootstrapValidator.js

@@ -155,7 +155,7 @@
                 helpBlock = $parent.find('.help-block');
 
             if (helpBlock.length == 0) {
-                var $small = $('<small/>').addClass('help-block').appendTo($parent);
+                var $small = $('<small/>').addClass('help-block').css('display', 'none').appendTo($parent);
                 $field.data('bootstrapValidator.error', $small);
 
                 // Calculate the number of columns of the label/field element