Documentation ¶
Index ¶
- Variables
- func IdStrValid(v *validator.Validate, topStruct reflect.Value, ...) bool
- func IsIdStr(id string) bool
- func IsLoginName(name string) bool
- func IsPassword(pswd string) bool
- func IsPhoneNum(num string) bool
- func IsPhoneNum2(phone string) bool
- func LoginNameValid(v *validator.Validate, topStruct reflect.Value, ...) bool
- func PasswordValid(v *validator.Validate, topStruct reflect.Value, ...) bool
- func PhoneNumValid(v *validator.Validate, topStruct reflect.Value, ...) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //密码 PatternPassword = "[[:alnum:]~!@#$%^&*()-=]{8,50}" //登录名 PatternLoginName = "^[a-zA-Z]{1}[:alnum:]{0,49}" //手机号 PatternPhoneNum = "^(\\+\\d{2}-)?(\\d{2,3}-)?([1][3,4,5,7,8][0-9]\\d{8})$" //id号 字母数字32位 PatternId = "[:alnum:]{32}" )
Functions ¶
func IdStrValid ¶
func IsLoginName ¶
func IsPassword ¶
func IsPhoneNum ¶
func IsPhoneNum2 ¶
func LoginNameValid ¶
func PasswordValid ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.