Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
bf6b3b26
Commit
bf6b3b26
authored
Jan 15, 2021
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:和IOS保持一致,加国内手机号正则校验
parent
4c64ee1c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
2 deletions
+0
-2
RegisterAndLoginActivity.kt
m-user/src/main/java/com/yidianling/user/ui/login/RegisterAndLoginActivity.kt
+0
-2
No files found.
m-user/src/main/java/com/yidianling/user/ui/login/RegisterAndLoginActivity.kt
View file @
bf6b3b26
...
...
@@ -438,7 +438,6 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
if
(!
TextUtils
.
equals
(
"0086"
,
countryCode
))
{
return
!
TextUtils
.
isEmpty
(
editPhone
)
}
LogUtil
.
e
(
"aaa"
+
editPhone
.
length
+
"bbb"
+
checkRegex
(
editPhone
.
toString
().
trim
()))
return
if
(
editPhone
.
length
==
11
&&
editPhone
.
startsWith
(
"1"
)&&
checkRegex
(
editPhone
.
toString
().
trim
()))
{
view_lin
.
setBackgroundColor
(
Color
.
parseColor
(
"#E8E8E8"
))
true
...
...
@@ -450,7 +449,6 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
}
}
private
fun
checkRegex
(
phone
:
String
):
Boolean
{
LogUtil
.
e
(
"aaaa"
+
phone
)
val
regex
=
"^1+[23456789]+\\d{9}"
return
phone
.
matches
(
regex
.
toRegex
())
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment