standards

package
v0.0.0-...-347cd60 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const EmailRegex = "^[a-zA-Z0-9]+(?:\\.[a-zA-Z0-9]+)*@[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*(?:\\.[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*)*$"

* Email standard

View Source
const MaxDisplayNameLength = 32 // is 32 now cause it is encoded with base64 and utf8

* Account display name standard

View Source
const MaxUsernameLength = 16
View Source
const MinUsernameLength = 3

* Account name standard

View Source
const UsernameAllowedCharacters = "^[\\p{Ll}\\p{N}_\\-]+$"

Variables

This section is empty.

Functions

func CheckDisplayName

func CheckDisplayName(username string) localization.Translations

Check the requirements for a display name

func CheckEmail

func CheckEmail(email string) (bool, string)

func CheckUsername

func CheckUsername(username string) localization.Translations

Check the requirements for a username

func NormalizeEmail

func NormalizeEmail(email string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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