Documentation ¶
Index ¶
- Variables
- func Captcha(manager *captchas.Manager, id string, clear bool) validation.RuleFunc
- func IsEmailAvailable(value interface{}) error
- func IsUserEmailTaken(db *sqlex.DB) validation.RuleFunc
- func IsUsernameAvailable(value interface{}) error
- func IsUsernameTaken(db *sqlex.DB) validation.RuleFunc
- func UserPassword(user *oldmodels.User) validation.RuleFunc
- func ValidatePassword(value interface{}) error
- func ValidateUsername(value interface{}) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrPasswordDigit = errors.New("password must contain at least one digit") ErrPasswordLowercaseCharacter = errors.New("password must contain at least one lowercase character") ErrPasswordUppercaseCharacter = errors.New("password must contain at least one uppercase character") ErrPasswordMinLength = errors.New("password must contain at least six characters and digits") )
View Source
var ( ErrIncorrectPassword = errors.New("incorrect username or password") ErrEmailWasTaken = errors.New("email was taken") ErrUsernameWasTaken = errors.New("username was taken") )
Errors
View Source
var (
ErrInvalidCaptcha = errors.New("Invalid captcha")
)
View Source
var ErrUsername = errors.New("username must contain at least three characters and digits")
Functions ¶
func IsEmailAvailable ¶
func IsEmailAvailable(value interface{}) error
func IsUserEmailTaken ¶
func IsUserEmailTaken(db *sqlex.DB) validation.RuleFunc
IsUserEmailTaken validates whether the user email was taken.
func IsUsernameAvailable ¶
func IsUsernameAvailable(value interface{}) error
func IsUsernameTaken ¶
func IsUsernameTaken(db *sqlex.DB) validation.RuleFunc
IsUsernameTaken validates whether the username was taken.
func UserPassword ¶
func UserPassword(user *oldmodels.User) validation.RuleFunc
UserPassword validates user password.
func ValidatePassword ¶
func ValidatePassword(value interface{}) error
func ValidateUsername ¶
func ValidateUsername(value interface{}) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.