Documentation ¶
Index ¶
- Variables
- func CheckPassword(s string) bool
- func CheckStrongPassword(s string) bool
- func IsCnMobile(val interface{}) bool
- func IsCnPhone(val interface{}) bool
- func IsEmail(val interface{}) bool
- func IsIP(val interface{}) bool
- func IsIP4(val interface{}) bool
- func IsIP6(val interface{}) bool
- func IsURL(val interface{}) bool
- func NewValidatorTrans() (*validator.Validate, *ut.Translator, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Validtool *validator.Validate ValidTrans *ut.Translator )
Functions ¶
func CheckPassword ¶
func CheckStrongPassword ¶
func IsCnPhone ¶
func IsCnPhone(val interface{}) bool
验证中国大陆的电话号码。支持如下格式:
0578-12345678-1234 057812345678-1234
若存在分机号,则分机号的连接符不能省略。
func NewValidatorTrans ¶
func NewValidatorTrans() (*validator.Validate, *ut.Translator, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.