Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Default ¶
Default returns the singleton validator instance with all custom validations registered.
func DetailForFirstError ¶
func DetailForFirstError(err error, fallback string, details ...ErrorDetail) string
DetailForFirstError extracts the first validator failure and returns the matching caller-owned detail. It returns fallback for non-validator errors and unmapped failures.
Types ¶
type ErrorDetail ¶
ErrorDetail maps a validator field/tag pair to a caller-owned error detail. An empty Tag matches any validation tag for the field.
Click to show internal directories.
Click to hide internal directories.