Эх сурвалжийг харах

Fix(更新):
- 修复管理员账号、密码正则判断取反的BUG

周文健 3 сар өмнө
parent
commit
31ea6ef32d

+ 2 - 2
app/src/main/java/com/grkj/iscs/features/init/fragment/InitSetAdminAccountFragment.kt

@@ -49,7 +49,7 @@ class InitSetAdminAccountFragment : BaseFragment<FragmentInitSetAdminAccountBind
             return false
         }
         val username = binding.adminUsernameEt.text.toString()
-        if (RegexUtils.isMatch(username, CommonConstants.REGEX_USERNAME)){
+        if (!RegexUtils.isMatch(username, CommonConstants.REGEX_USERNAME)){
             showToast(CommonUtils.getStr(R.string.username_regex_tip).toString())
             return false
         }
@@ -62,7 +62,7 @@ class InitSetAdminAccountFragment : BaseFragment<FragmentInitSetAdminAccountBind
             return false
         }
         val password = binding.passwordEt.text.toString()
-        if (RegexUtils.isMatch(password, CommonConstants.REGEX_PASSWORD)){
+        if (!RegexUtils.isMatch(password, CommonConstants.REGEX_PASSWORD)){
             showToast(CommonUtils.getStr(R.string.password_regex_tip).toString())
             return false
         }