Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Check ¶
Check *
- @Description: 对结构体内置数据类型根据validator库进行校验
- (不支持slice、array、struct、map、channel、interface、function类型)
- @param s
- @param rules
- @return err
func CheckField ¶
CheckField *
- @Description: 字段校验
- @param field 字段实例("joeybloggs.gmail.com")
- @param tag 校验标签("required,email")
- @return errs 返回错误
func CheckStruct ¶
func CheckStruct(s interface{}) (errF validator.FieldError)
CheckStruct *
- @Description: 校验结构体
- @param s 结构体
- @return errF 错误
Types ¶
Click to show internal directories.
Click to hide internal directories.