初始化提交
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package utils
|
||||
|
||||
import "regexp"
|
||||
|
||||
// RegexpMobile 手机号匹配
|
||||
func RegexpMobile(mobile string) bool {
|
||||
ok, err := regexp.MatchString(`^1[3-9][0-9]{9}$`, mobile)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
return ok
|
||||
}
|
||||
Reference in New Issue
Block a user