Documentation
¶
Overview ¶
Package validate validates structs using rules declared in `validate` struct tags. It is framework-agnostic and stdlib-only, so the web and CLI layers can share one rule model.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FieldError ¶
FieldError describes a single validation failure.
func (FieldError) Error ¶
func (e FieldError) Error() string
type ValidationError ¶
type ValidationError struct {
Fields []FieldError
}
ValidationError aggregates one or more field failures.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
func (*ValidationError) Is ¶
func (e *ValidationError) Is(target error) bool
Click to show internal directories.
Click to hide internal directories.