From de564e6fd990960ea5796eadfa3b3fda7866a256 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期一, 26 十月 2020 10:53:54 +0800 Subject: [PATCH] V2.510231 1.密码规则修改,修改为:密码必须为8-20个字符,包含字母、数字和符号。 2.APP本地增加登录,密码错误锁定,连续错误5次登录锁定,锁定5分钟。 3.登录界面,增加登录账号的邮箱格式匹配检测。 --- Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountRegistration.cs | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountRegistration.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountRegistration.cs index 63d65c5..b93a02f 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountRegistration.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountRegistration.cs @@ -226,8 +226,8 @@ }; btnOK.MouseUpEventHandler += (sender, e) => { - var reg = new Regex ("^\\s*([A-Za-z0-9_-]+(\\.\\w+)*@(\\w+\\.)+\\w{2,5})\\s*$"); - var ss = reg.Match (etEmailAddress.Text); + //var reg = new Regex ("^\\s*([A-Za-z0-9_-]+(\\.\\w+)*@(\\w+\\.)+\\w{2,5})\\s*$"); + //var ss = reg.Match (etEmailAddress.Text); string account = etEmailAddress.Text.Trim (); string passwordText = etPasswrod.Text.Trim (); @@ -240,16 +240,21 @@ } else if (regName.Match (userName).Success) { new Alert ("", "Protect Your Illegal Characters in Name", Language.StringByID (R.MyInternationalizationString.Close)).Show (); return; - } else if (!ss.Success) { + } else if (!CommonUtlis.Current.CheckEmail (account)) { new Alert ("", Language.StringByID (R.MyInternationalizationString.PleaseCheckEmailAddressCorrectly), Language.StringByID (R.MyInternationalizationString.Close)).Show (); return; - } else if (etPasswrod.Text.Trim ().Length < 6) { - new Alert ("", Language.StringByID (R.MyInternationalizationString.PasswordLenghtTip), Language.StringByID (R.MyInternationalizationString.Close)).Show (); - return; - } else if (etPasswrod.Text == "" && etConfirmPassword.Text == "") { + } + + + + if (etPasswrod.Text == "" && etConfirmPassword.Text == "") { new Alert ("", Language.StringByID (R.MyInternationalizationString.PleaseWriteTheCompleteContent), Language.StringByID (R.MyInternationalizationString.Close)).Show (); return; + } else if (!CommonUtlis.Current.CheckPassword(etPasswrod.Text.Trim ())) { + new Alert ("", ErrorCode.PasswordStrengthNotMatch, + Language.StringByID (R.MyInternationalizationString.Close)).Show (); + return; } else if (etPasswrod.Text.Trim () != etConfirmPassword.Text.Trim ()) { new Alert ("", Language.StringByID (R.MyInternationalizationString.RepeatPasswordsDidNotmatch), Language.StringByID (R.MyInternationalizationString.Close)).Show (); -- Gitblit v1.8.0