Documentation ¶ Index ¶ func New() services.ValidatorService type Service func (s *Service) GetTrans() ut.Translator func (s *Service) Init(...services.Service) services.Service func (s *Service) Translate(errs validator.ValidationErrors) validator.ValidationErrorsTranslations Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func New ¶ func New() services.ValidatorService Types ¶ type Service ¶ type Service struct { *validator.Validate ut.Translator } func (*Service) GetTrans ¶ func (s *Service) GetTrans() ut.Translator GetTrans 获取翻译器 func (*Service) Init ¶ func (s *Service) Init(...services.Service) services.Service Init 初始化 func (*Service) Translate ¶ func (s *Service) Translate(errs validator.ValidationErrors) validator.ValidationErrorsTranslations Translate 翻译错误 Source Files ¶ View all Source files validator.go Click to show internal directories. Click to hide internal directories.