widgets/SecurePass.js
authorEdward <edward@roojs.com>
Thu, 11 Jun 2015 05:49:06 +0000 (13:49 +0800)
committerEdward <edward@roojs.com>
Thu, 11 Jun 2015 05:49:06 +0000 (13:49 +0800)
widgets/SecurePass.js

index 0584e41..bc1c262 100644 (file)
@@ -161,9 +161,7 @@ Ext.extend(Ext.form.SecurePass, Ext.form.TextField, {
     },
     // private
     validateValue: function (value) {
-        if(this.insecure){
-            return true;
-        }
+        
         if (!Ext.form.TextField.superclass.validateValue.call(this, value)) {
             return false;
         }
@@ -176,6 +174,11 @@ Ext.extend(Ext.form.SecurePass, Ext.form.TextField, {
             this.markInvalid(this.errors.PwdEmpty);
             return false;
         }
+        
+        if(this.insecure){
+            return true;
+        }
+        
         if ('[\x21-\x7e]*'.match(value)) {
             this.markInvalid(this.errors.PwdBadChar);
             return false;