roojs-bootstrap.js
authorAlan Knowles <alan@roojs.com>
Wed, 30 Dec 2020 06:34:59 +0000 (14:34 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 30 Dec 2020 06:34:59 +0000 (14:34 +0800)
roojs-bootstrap-debug.js
Roo/bootstrap/SecurePass.js

Roo/bootstrap/SecurePass.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index c770a79..d2ed390 100644 (file)
@@ -208,7 +208,7 @@ Roo.extend(Roo.bootstrap.SecurePass, Roo.bootstrap.Input, {
         if(this.insecure){
             return true;
         }
-         
+        
         if (!value.match(/[\x21-\x7e]*/)) {
             this.markInvalid(this.errors.PwdBadChar);
             this.errorMsg = this.errors.PwdBadChar;
index 6f0d9bf..15d5fc5 100644 (file)
@@ -23505,7 +23505,7 @@ Roo.extend(Roo.bootstrap.SecurePass, Roo.bootstrap.Input, {
             return true;
         }
         
-        if (value.match(/[\x21-\x7e]*/)) {
+        if (!value.match(/[\x21-\x7e]*/)) {
             this.markInvalid(this.errors.PwdBadChar);
             this.errorMsg = this.errors.PwdBadChar;
             return false;
index 1abb2a6..9b1626f 100644 (file)
@@ -991,8 +991,8 @@ if(A==this._lastPwd){return;}var B;if(this.ClientSideStrongPassword(A)){B=3;}els
 pm.addClass(this.meterClass[B]);var pt=this.trigger.child('/div').child('>*[class=roo-password-meter-text]').dom;pt.innerHTML=this.meterLabel+'&nbsp;'+this.pwdStrengths[B];this._lastPwd=A;},reset:function(){Roo.bootstrap.SecurePass.superclass.reset.call(this);
 this._lastPwd='';var pm=this.trigger.child('div/div');pm.removeClass(this.meterClass);pm.addClass('roo-password-meter-grey');var pt=this.trigger.child('/div').child('>*[class=roo-password-meter-text]').dom;pt.innerHTML='';this.inputEl().dom.type='password';
 },validateValue:function(A){if(!Roo.bootstrap.SecurePass.superclass.validateValue.call(this,A)){return false;}if(A.length==0){if(this.allowBlank){this.clearInvalid();return true;}this.markInvalid(this.errors.PwdEmpty);this.errorMsg=this.errors.PwdEmpty;return false;
-}if(this.insecure){return true;}if(A.match(/[\x21-\x7e]*/)){this.markInvalid(this.errors.PwdBadChar);this.errorMsg=this.errors.PwdBadChar;return false;}if(A.length<6){this.markInvalid(this.errors.PwdShort);this.errorMsg=this.errors.PwdShort;return false;}
-if(A.length>16){this.markInvalid(this.errors.PwdLong);this.errorMsg=this.errors.PwdLong;return false;}var B;if(this.ClientSideStrongPassword(A)){B=3;}else if(this.ClientSideMediumPassword(A)){B=2;}else if(this.ClientSideWeakPassword(A)){B=1;}else{B=0;}if(B<2){this.errorMsg=this.errors.TooWeak;
+}if(this.insecure){return true;}if(!A.match(/[\x21-\x7e]*/)){this.markInvalid(this.errors.PwdBadChar);this.errorMsg=this.errors.PwdBadChar;return false;}if(A.length<6){this.markInvalid(this.errors.PwdShort);this.errorMsg=this.errors.PwdShort;return false;
+}if(A.length>16){this.markInvalid(this.errors.PwdLong);this.errorMsg=this.errors.PwdLong;return false;}var B;if(this.ClientSideStrongPassword(A)){B=3;}else if(this.ClientSideMediumPassword(A)){B=2;}else if(this.ClientSideWeakPassword(A)){B=1;}else{B=0;}if(B<2){this.errorMsg=this.errors.TooWeak;
 }console.log('strength2: '+B);var pm=this.trigger.child('div/div');pm.removeClass(this.meterClass);pm.addClass(this.meterClass[B]);var pt=this.trigger.child('/div').child('>*[class=roo-password-meter-text]').dom;pt.innerHTML=this.meterLabel+'&nbsp;'+this.pwdStrengths[B];
 this.errorMsg='';return true;},CharacterSetChecks:function(A){this.type=A;this.fResult=false;},isctype:function(A,B){switch(B){case this.kCapitalLetter:if(A>='A'&&A<='Z'){return true;}break;case this.kSmallLetter:if(A>='a'&&A<='z'){return true;}break;case this.kDigit:if(A>='0'&&A<='9'){return true;
 }break;case this.kPunctuation:if('!@#$%^&*()_+-=\'";:[{]}|.>,</?`~'.indexOf(A)>=0){return true;}break;default:return false;}},IsLongEnough:function(A,B){return !(A==null||isNaN(B)||A.length<B);},SpansEnoughCharacterSets:function(A,nb){if(!this.IsLongEnough(A,nb)){return false;