Documentation
¶
Overview ¶
Filename: internal/validator/validator.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PasswordNumberRX = regexp.MustCompile("[0-9]") PasswordUpperRX = regexp.MustCompile("[A-Z]") PasswordLowerRX = regexp.MustCompile("[a-z]") PasswordSpecialRX = regexp.MustCompile("[!@#~$%^&*()+|_]") PasswordMinLength = 8 PasswordMaxLength = 72 )
Password complexity regular expressions
View Source
var EmailRX = 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])?)*$")
emailRX is a regular expression for validating email addresses
Functions ¶
This section is empty.
Types ¶
type Validator ¶
Validator Structure to hold validation errors
func (*Validator) AddError ¶
AddError adds an error message for a specific field if it doesn't already exist
Click to show internal directories.
Click to hide internal directories.