Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewParseValidator ¶
func NewParseValidator[T any](parseFunction func(string) (T, error), description string) validator.String
NewParseValidator creates a validator which uses a parsing function to validate a string. The function is expected to return a value of type `T` and an error. If the error is non-nil, the validator will fail. The `description` argument should contain a description of the validator's effect.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.