Documentation ¶
Index ¶
- func EnTrans() ut.Translator
- func New(tagNames ...string) *validator.Validate
- func Struct(s interface{}) error
- func StructCtx(ctx context.Context, s interface{}) error
- func ValidateMap(data map[string]interface{}, rules map[string]interface{}) map[string]interface{}
- func ValidateMapCtx(ctx context.Context, data map[string]interface{}, rules map[string]interface{}) map[string]interface{}
- func ValidateVar(field interface{}, tag string) error
- func ValidateVarCtx(ctx context.Context, field interface{}, tag string) error
- func ValidateVarWithValue(field interface{}, other interface{}, tag string) error
- func ValidateVarWithValueCtx(ctx context.Context, field interface{}, other interface{}, tag string) error
- func ZhTrans() ut.Translator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnTrans ¶
func EnTrans() ut.Translator
func New ¶
func New(tagNames ...string) *validator.Validate
New 返回 validator.Validate 实例 不传参,默认使用 validate tag,传参使用第一个作为 tag name
func ValidateMap ¶
func ValidateMapCtx ¶
func ValidateVar ¶
func ValidateVarWithValue ¶
func ValidateVarWithValueCtx ¶
func ZhTrans ¶
func ZhTrans() ut.Translator
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.