validation

package
v0.0.0-...-00092a5 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AttributionRE *regexp.Regexp = regexp.MustCompile(`[a-z_]+`)
View Source
var EmailRE *regexp.Regexp = regexp.MustCompile(`(?P<name>[a-zA-Z0-9.!#$%&'*+/=?^_ \x60{|}~-]+)@(?P<domain>[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])?)*)$`)
View Source
var TestEmailRE *regexp.Regexp = regexp.MustCompile(`dpetroff(\+[^@]+)?@gmail.com`)

Functions

func EmailOKToAddToWaitingList

func EmailOKToAddToWaitingList(ctx context.Context, db boil.ContextExecutor, address string) (string, bool)

func EmailOKToSignup

func EmailOKToSignup(ctx context.Context, db boil.ContextExecutor, sender sender.Sender, address string) (string, bool)

func ValidateEnum

func ValidateEnum[A comparable](value A, vals []A, labels []string) error

func ValidateMinMax

func ValidateMinMax(label string, p string, minL int, maxL int) error

func ValidatePassword

func ValidatePassword(p string) error

func ValidateURL

func ValidateURL(value string) error

ValidateURL checks if the provided string is a valid URL. The URL must be absolute (have a protocol) and include a domain name. Returns nil if the URL is valid or empty, otherwise returns an error with a description.

func ValidateUsername

func ValidateUsername(p 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