Documentation ¶
Index ¶
- func CheckEmail(email string) (ok bool)
- func CheckPRCID(id string) (ok bool)
- func CheckPassword(pwd string, level int) (err error)
- func CheckPhone(phone string) (ok bool)
- func CheckStruct(objs ...interface{}) (err error)
- func CheckUSCI(id string) (ok bool)
- type Bool
- type Email
- type In
- type Length
- type Max
- type Min
- type MobilePhone
- type Must
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPassword ¶
CheckPassword 检查密码强度是否合法 1:密码长度6-24位 2:密码长度6-24位,必须同时包含字母和数字 3:密码长度6-24位,必须同时包含大写字母,小写字母和数字 4:密码长度6-24位,必须同时包含大写字母,小写字母,数字和特殊字符[!@#~$%^&*()+|_]
Types ¶
type MobilePhone ¶
type MobilePhone struct{}
MobilePhone 对字段进行非空检查
func (*MobilePhone) Validate ¶
func (s *MobilePhone) Validate(t reflect.StructField, v reflect.Value, params []string) (err error)
Validate 校验实现
Click to show internal directories.
Click to hide internal directories.