Files
go-easy-utils/validx/other_number.go
2025-07-08 15:26:54 +08:00

10 lines
188 B
Go

package validx
import "regexp"
// IsPostalCode 验证是否为邮编号码
func IsPostalCode(str string) bool {
reg := regexp.MustCompile(`^[1-9]\d{5}$`)
return reg.MatchString(str)
}