Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ModelError ¶
func ModelError(errs []ValidationError) map[string]string
Types ¶
type PlaygroundValidator ¶
type PlaygroundValidator struct {
// contains filtered or unexported fields
}
func NewPlayground ¶ added in v0.0.25
func NewPlayground() PlaygroundValidator
func (PlaygroundValidator) Validate ¶
func (val PlaygroundValidator) Validate(target interface{}) ([]ValidationError, error)
type ValidationError ¶
type ValidationError struct { // Tag is the condition that have failed Tag string // Complete path to the field that have the error. Path string // Field is the name (and only the name) of the failing field Field string // Error is the stringified error Err string Value interface{} Kind reflect.Kind }
func (ValidationError) Error ¶
func (v ValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.