fix: 手机号正则判断限制3位数

This commit is contained in:
TsMask
2024-04-15 17:09:13 +08:00
parent e42dd9465a
commit eea8b803ac

View File

@@ -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