fix: 手机号正则判断限制3位数
This commit is contained in:
1 parent
e42dd9465a
commit
eea8b803ac
1 file changed
+1
-1
@@ -48,7 +48,7 @@ func ValidMobile(mobile string) bool {
|
||||
if mobile == "" {
|
||||
return false
|
||||
}
|
||||
pattern := `^1[3|4|5|6|7|8|9][0-9]\d{8}$`
|
||||
pattern := `^.{3,}$` // `^1[3|4|5|6|7|8|9][0-9]\d{8}$`
|
||||
match, err := regexp.MatchString(pattern, mobile)
|
||||
if err != nil {
|
||||
return false
|
||||
|
||||
Reference in new issue
Block a user