Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NonEmptyValidator ¶
type NonEmptyValidator struct{}
NonEmptyValidator checks that the input is not empty after trimming
func (NonEmptyValidator) Validate ¶
func (v NonEmptyValidator) Validate(input string) error
Validate checks the input and return an error if its invalid
type NumericRangeValidator ¶
NumericRangeValidator checks that the input is a valid number after trimming and its value is between a given range
func (NumericRangeValidator) Validate ¶
func (v NumericRangeValidator) Validate(input string) error
Validate checks the input and return an error if its invalid
type RegexValidator ¶
type RegexValidator struct {
Pattern string
}
RegexValidator checks that the input matches a pattern after trimming
func (RegexValidator) Validate ¶
func (v RegexValidator) Validate(input string) error
Validate checks the input and return an error if its invalid
Click to show internal directories.
Click to hide internal directories.