mirror of
https://gitee.com/willfree/min-vpn-client_v2.git
synced 2026-10-04 19:42:00 +08:00
修正密码格式验证
This commit is contained in:
1 parent
3b44af3153
commit
bb7f18307f
6 files changed
+5
-5
No files matched your search
+2
-2
@@ -42,8 +42,8 @@ android {
|
||||
applicationId "com.pkusz.min_vpn_client"
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 30
|
||||
versionCode 4
|
||||
versionName "4.0.0"
|
||||
versionCode 2
|
||||
versionName "2.0.1"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
|
||||
@@ -141,12 +141,12 @@ public class RegisterActivity extends MINVpnBaseActivity<RegisterActivityPresent
|
||||
return;
|
||||
}
|
||||
if(!AccountValidatorRegexUtil.INSTANCE.isPassword(password)){
|
||||
showWarning("请输入有效的密码,密码为8-16位,必须包含大小写字母和特殊符号");
|
||||
showWarning("请输入有效的密码,密码为8-20位,必须包含大小写字母和特殊符号");
|
||||
btnRegister.revertAnimation();
|
||||
return;
|
||||
}
|
||||
if(!AccountValidatorRegexUtil.INSTANCE.isPassword(rePassword)){
|
||||
showWarning("请输入有效的密码,密码为8-16位,必须包含大小写字母和特殊符号");
|
||||
showWarning("请输入有效的密码,密码为8-20位,必须包含大小写字母和特殊符号");
|
||||
btnRegister.revertAnimation();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ object AccountValidatorRegexUtil {
|
||||
/**
|
||||
* 正则表达式:验证密码
|
||||
*/
|
||||
val REGEX_PASSWORD = "^(?=.*[A-Za-z])(?=.*\\d)(?=.*[\$@\$!%*.#?&])[A-Za-z\\d\$@\$!%*.#?&]{8,20}\$"
|
||||
val REGEX_PASSWORD = "^(?=.*[A-Za-z])(?=.*\\d)(?=.*[\$@\$!%*.#?&])[A-Za-z\\d\$@\$!%*.#?&]{7,21}\$"
|
||||
|
||||
/* val REGEX_PASSWORD1 = "^((?![a-z]+$)(?![A-Z]+$)(?!\\d+$)(?![!@#$%^&*._-]+$)(?![a-zA-Z\\d]+$)(?![a-zA-Z!@#$%^&*._-]+$)(?![\\d!@#$%^&*._-]+$)[a-zA-Z\\d!@#$%^&*._-]+){8,20}$"
|
||||
val REGEX_PASSWORD2 = ".*[A-Z]+.*"
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user