|
package helper
|
|
|
|
import "regexp"
|
|
|
|
// chineseMobileFormMatcher 手机号格式正则匹配器
|
|
var chineseMobileFormMatcher = regexp.MustCompile(`^1\d{10}$`)
|
|
|
|
// IsMobileForm 手机号格式,不严谨的验证
|
|
func IsMobileForm(mobile string) bool {
|
|
return chineseMobileFormMatcher.MatchString(mobile)
|
|
}
|