1 Star 0 Fork 0

wdxtub / gocdt

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
phone.go 314 Bytes
一键复制 编辑 原始数据 按行查看 历史
dawang 提交于 2021-08-30 12:25 . add validation
package validate
import "regexp"
// VerifyMobileFormat 校验手机号(中国大陆)
func VerifyMobileFormat(mobileNum string) bool {
regular := "^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|(147))\\d{8}$"
reg := regexp.MustCompile(regular)
return reg.MatchString(mobileNum)
}
Go
1
https://gitee.com/wdxtub/gocdt.git
git@gitee.com:wdxtub/gocdt.git
wdxtub
gocdt
gocdt
v0.1.3

搜索帮助