Documentation ¶
Index ¶
Constants ¶
View Source
const ( NotEmptyIsEmpty = "Value is required and can't be empty" EmailAddressInvalidFormat = "The input is not a valid email address" URLInvalidFormat = "The input is not a valid URL" StringLengthTooShort = "The input is less than %d characters long" StringLengthTooLong = "The input is more than %d characters long" EmailNotExistsExists = "E-mail already registered" IdenticalStringsNotSame = "The two given tokens do not match" NotInArray = "The input was not found in the haystack" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmailAddress ¶
type EmailAddress struct{}
EmailAddress validator.
func (*EmailAddress) IsValidString ¶
func (s *EmailAddress) IsValidString(value string) ([]string, error)
IsValidString IsValidString.
type EmailNotExists ¶
EmailNotExists validator.
func (*EmailNotExists) IsValidString ¶
func (s *EmailNotExists) IsValidString(value string) ([]string, error)
IsValidString IsValidString.
type FilterInterface ¶
type IdenticalStrings ¶
type IdenticalStrings struct {
Pattern string
}
IdenticalStrings validator.
func (*IdenticalStrings) IsValidString ¶
func (s *IdenticalStrings) IsValidString(value string) ([]string, error)
IsValidString IsValidString.
type InputFilter ¶
type InputFilter struct { Filters []FilterInterface Validators []ValidatorInterface }
func (*InputFilter) IsValidString ¶
func (s *InputFilter) IsValidString(value string) (string, []string, error)
IsValidString IsValidString.
type StringLength ¶
StringLength validator.
func (*StringLength) IsValidString ¶
func (s *StringLength) IsValidString(value string) ([]string, error)
IsValidString IsValidString.
type StringSingleSpaces ¶
type StringSingleSpaces struct{}
StringSingleSpaces filter.
func (*StringSingleSpaces) FilterString ¶
func (s *StringSingleSpaces) FilterString(value string) string
FilterString filter.
type StringTrimFilter ¶
type StringTrimFilter struct{}
StringTrimFilter filter.
func (*StringTrimFilter) FilterString ¶
func (s *StringTrimFilter) FilterString(value string) string
FilterString filter.
type ValidatorInterface ¶
Click to show internal directories.
Click to hide internal directories.