validator

package
v0.6.20-b4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ValidateEntry *validator.Validate

Functions

func ErrResp added in v0.2.12

func ErrResp(err error) string

handler中调用的错误翻译方法

func InitTrans added in v0.2.12

func InitTrans(locale string, validate binding.StructValidator) (err error)

InitTrans 初始化翻译器

func InitValidator added in v0.6.16

func InitValidator(locale string, v *validator.Validate) (err error)

func InitValidatorDefault added in v0.6.16

func InitValidatorDefault(locale string) (err error)

func ValidateStruct added in v0.6.16

func ValidateStruct(obj any) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL