Ai
1 Star 0 Fork 1

周涛/go_utils

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
phoneValidate.go 257 Bytes
一键复制 编辑 原始数据 按行查看 历史
周涛 提交于 2020-08-12 11:20 +08:00 . 增加手机号验证规则
package myValidate
import "regexp"
const 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}$"
func VerifyPhone(mobileNum string) bool {
reg := regexp.MustCompile(regular)
return reg.MatchString(mobileNum)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/super_step/go_utils.git
git@gitee.com:super_step/go_utils.git
super_step
go_utils
go_utils
v1.1.6

搜索帮助