Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PermittedValue ¶
func PermittedValue[T comparable](value T, permittedValues ...T) bool
PermittedValue returns true if the value is in the list of permitted values.
Types ¶
type Validator ¶
Validator is a struct that contains a map of field errors.
func (*Validator) AddFieldError ¶
AddFieldError adds an error message to the map of field errors.
func (*Validator) CheckField ¶
CheckField checks if a condition is met and adds an error message to the map of field errors if it is not.
Click to show internal directories.
Click to hide internal directories.