Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsClientError ¶ added in v0.25.0
IsClientError will determine if an error's cause is due to request/client error.
func IsValidationError ¶
IsValidationError will determine if an error's cause is a field validation error.
func NewGenericError ¶ added in v0.24.0
NewGenericError will create a new generic 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
func NewFieldErrorf ¶ added in v0.29.0
func NewFieldErrorf(fieldName string, reasonFormat string, args ...interface{}) 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.