Documentation ¶
Index ¶
Constants ¶
View Source
const Key = "Validator"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TagErrorFactory ¶
type TagErrorFactory func(e validator.FieldError) string
type TagErrorMap ¶
type TagErrorMap map[string]TagErrorFactory
type ValidationError ¶
type ValidationError struct { OriginalError validator.FieldError Msg string }
func (ValidationError) Error ¶
func (v ValidationError) Error() string
type ValidationErrorMutator ¶
type ValidationErrorMutator func(*ValidationError)
type ValidationErrors ¶
type ValidationErrors []ValidationError
func (ValidationErrors) Error ¶
func (v ValidationErrors) Error() string
type Validator ¶
type Validator interface { Struct(strct interface{}) error OnError(vem ValidationErrorMutator, tags ...string) TagErrors() TagErrorMap }
Click to show internal directories.
Click to hide internal directories.