|
@@ -21,6 +21,7 @@ import com.yingyangfly.baselib.mvvm.BaseMVVMActivity
|
|
|
import com.yingyangfly.baselib.router.RouterUrlCommon
|
|
|
import com.yingyangfly.baselib.utils.RxTimer
|
|
|
import com.yingyangfly.baselib.utils.User
|
|
|
+import java.util.regex.Pattern
|
|
|
|
|
|
/**
|
|
|
* 登录
|
|
@@ -56,6 +57,12 @@ class LoginActivity : BaseMVVMActivity<ActivityLoginBinding, LoginViewModel>(),
|
|
|
"请输入验证码".toast()
|
|
|
return false
|
|
|
}
|
|
|
+
|
|
|
+ if (Pattern.matches("^\\d{11}$", binding.username.text.toString().trim()).not()) {
|
|
|
+ "请输入正确的手机号".toast()
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
return true
|
|
|
}
|
|
|
|