Roo/bootstrap/Input.js
authorEdward <edward@roojs.com>
Tue, 10 Jul 2018 04:55:58 +0000 (12:55 +0800)
committerEdward <edward@roojs.com>
Tue, 10 Jul 2018 04:55:58 +0000 (12:55 +0800)
Roo/bootstrap/Input.js

index 59d38d4..d40fe99 100644 (file)
@@ -649,12 +649,14 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
      * @param {Mixed} value The value to validate
      * @return {Boolean} True if the value is valid, else false
      */
-    validateValue : function(value){
-        if(value.length < 1)  { // if it's blank
-            if(this.allowBlank){
-                return true;
-            }            
-            return this.inputEl().hasClass('hidden') ? true : false;
+    validateValue : function(value)
+    {
+        if(this.getEl().hasClass('hidden')){
+            return true;
+        }
+        
+        if(value.length < 1 && this.allowBlank)  { // if it's blank
+            return true;
         }
         
         if(value.length < this.minLength){