Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidationError ¶
IsValidationError will determine if an error's cause is a field validation error.
Types ¶
type FieldError ¶
A FieldError represents an invalid field during validation.
func NewFieldError ¶
func NewFieldError(fieldName string, reason string) FieldError
NewFieldError will create a new FieldError for the given field and reason
type MultiFieldError ¶
type MultiFieldError interface { error Validation() bool FieldErrors() []FieldError }
func NewMultiFieldError ¶
func NewMultiFieldError(errs []FieldError) MultiFieldError
NewMultiFieldError will combine multiple FieldErrors into a MultiFieldError.
Click to show internal directories.
Click to hide internal directories.