Documentation ¶
Overview ¶
Package validate contains the support for validating models.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsFieldErrors ¶
IsFieldErrors checks if an error of type FieldErrors exists.
func NewFieldsError ¶
NewFieldsError creates an fields error.
Types ¶
type FieldError ¶
FieldError is used to indicate an error with a specific request field.
type FieldErrors ¶
type FieldErrors []FieldError
FieldErrors represents a collection of field errors.
func GetFieldErrors ¶
func GetFieldErrors(err error) FieldErrors
GetFieldErrors returns a copy of the FieldErrors pointer.
func (FieldErrors) Error ¶
func (fe FieldErrors) Error() string
Error implements the error interface.
func (FieldErrors) Fields ¶
func (fe FieldErrors) Fields() map[string]string
Fields returns the fields that failed validation.
Click to show internal directories.
Click to hide internal directories.