val

package
v0.0.0-...-7a181e2 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStringTooShort  = errors.New("string is too short")
	ErrStringTooLong   = errors.New("string is too long")
	ErrInvalidUsername = errors.New("username can only contain letters, numbers or underscores")
	ErrInvalidFullName = errors.New("full_name can only contain letters or spaces")
	ErrInvalidEmail    = errors.New("email is invalid")
)

Functions

func ValidateEmail

func ValidateEmail(value string) error

func ValidateEmailId

func ValidateEmailId(value int64) error

func ValidateFullName

func ValidateFullName(value string) error

func ValidatePassword

func ValidatePassword(value string) error

func ValidateSecretCode

func ValidateSecretCode(value string) error

func ValidateString

func ValidateString(value string, minLength, maxLength int) error

func ValidateUsername

func ValidateUsername(value string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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