package utils import "regexp" func IsValidPhone(phone string) bool { // 简单验证:以1开头,后面10位数字 reg := regexp.MustCompile(`^1[0-9]{10}$`) return reg.MatchString(phone) }