- 修复电信手机号码验证
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

master v1.0.2
李光春 2 years ago
parent 143d2652be
commit 1e3fae2c8e

@ -57,7 +57,7 @@ func ChinaUnicomNumber(number string) bool {
// https://www.qqzeng.com/tongji.html // https://www.qqzeng.com/tongji.html
// 电信133 149 153 173 174 177 180 181 189 190 191 193 199 // 电信133 149 153 173 174 177 180 181 189 190 191 193 199
func ChinaTelecomNumber(number string) bool { func ChinaTelecomNumber(number string) bool {
regular := "^[1](([3][3])|([4][9])|([5][3)|([7][3-4,7])||([8][0-1,9])|([9][0-1,3,9]))[0-9]{8}$" regular := "^[1](([3][3])|([4][9])|([5][3])|([7][3-4,7])||([8][0-1,9])|([9][0-1,3,9]))[0-9]{8}$"
reg := regexp.MustCompile(regular) reg := regexp.MustCompile(regular)
return reg.MatchString(number) return reg.MatchString(number)
} }

@ -1,3 +1,3 @@
package goverify package goverify
const Version = "1.0.1" const Version = "1.0.2"

Loading…
Cancel
Save