validations

package
v0.0.0-...-c5fdaab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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")
)

Functions

func Captcha

func Captcha(manager *captchas.Manager, id string, clear bool) validation.RuleFunc

Captcha validates captcha.

func IsUserEmailTaken

func IsUserEmailTaken(db *sqlex.DB) validation.RuleFunc

IsUserEmailTaken validates whether the user email was taken.

func IsUsernameTaken

func IsUsernameTaken(db *sqlex.DB) validation.RuleFunc

IsUsernameTaken validates whether the username was taken.

func UserPassword

func UserPassword(user *models.User) validation.RuleFunc

UserPassword validates user password.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL