Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFieldErrors ¶
NewFieldErrors returns an error of type FieldErrors.
func ValidateStruct ¶
func ValidateStruct(structPtr interface{}, fields ...*validation.FieldRules) error
ValidateStruct is a wrapper around validation.ValidateStruct that transforms validation.Errors to FieldErrors.
Types ¶
type FieldError ¶
FieldError hold the attributes for a single field error.
func (FieldError) Error ¶
func (fe FieldError) Error() string
type FieldErrors ¶
type FieldErrors []FieldError
FieldErrors is a collection of field error.
func (FieldErrors) Error ¶
func (fes FieldErrors) Error() string
Error implements the error interface.
Click to show internal directories.
Click to hide internal directories.