Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EmailRE = regexp.MustCompile("^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$")
Functions ¶
func PermittedValue ¶
func PermittedValue[T comparable](value T, permittedValues ...T) bool
PermittedValue returns true if the given int is present in a list of values.
Types ¶
type Validator ¶
func (*Validator) AddFieldError ¶
AddFieldError keeps only the first message added for that particular key.
func (*Validator) AddNonFieldError ¶
func (*Validator) CheckField ¶
CheckField adds an error if the given condition check returns false.
Click to show internal directories.
Click to hide internal directories.