validator

package
v0.28.3 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SpecialCharValidator added in v0.6.21

func SpecialCharValidator(name string) error

SpecialCharValidator validates a name field for special characters returns an error if the name contains special characters. Only hyphens, underscores, periods, commas, and ampersands are allowed

func ValidateDomains

func ValidateDomains() func(domains []string) error

ValidateDomains validates a list of domains and returns an error if any of them are invalid domains can be up to 255 characters long and follow a known domain regex

func ValidatePhoneNumber

func ValidatePhoneNumber(phoneNumber string) bool

ValidatePhoneNumber validates a phone number using the phone numbers library this is light validation as it just need to be valid in _any_ region to be considered valid

func ValidateURL added in v0.7.2

func ValidateURL() func(u string) error

ValidateURL validates a url and returns an error if it is invalid urls can be up to 2048 characters long and follow the same domain regex

Types

This section is empty.

Jump to

Keyboard shortcuts

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