Documentation ¶
Overview ¶
Package validate contains the support for validating models.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Check ¶
func Check(val interface{}) error
Check validates the provided model against it's declared tags.
func IsFieldErrors ¶
IsFieldErrors checks if an error of type FieldErrors exists.
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 implments 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.