Documentation ¶
Index ¶
Constants ¶
View Source
const ( // 正则 UserNameRegexp = `^[a-zA-Z][a-zA-Z0-9_-]{3,15}$` PasswordRegexp = `^[a-fA-F0-9]{32,64}$` EmailRegexp = `^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$` //PhoneRegexp = `^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$` MobileRegexp = `^(1)\d{10}$` PhoneRegexp = "" /* 156-byte string literal not displayed */ )
Variables ¶
View Source
var (
Validator *validator.Validate
)
Functions ¶
func XValidator ¶
func XValidator(u interface{}) (error, *[]xresponse.ParamError)
* 通过xvalid_error注入需要自定义显示的错误信息
func XValidatorInit ¶
func XValidatorInit() error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.