Documentation ¶
Index ¶
- func CustomCSS(customCSS string) error
- func DisplayName(displayName string) error
- func Email(email string) error
- func EmojiShortcode(shortcode string) error
- func Language(lang string) error
- func NewPassword(password string) error
- func Note(note string) error
- func Privacy(privacy string) error
- func SignUpReason(reason string, reasonRequired bool) error
- func SiteDescription(d string) error
- func SiteShortDescription(d string) error
- func SiteTerms(t string) error
- func SiteTitle(siteTitle string) error
- func StatusFormat(statusFormat string) error
- func Struct(s interface{}) error
- func ULID(i string) bool
- func Username(username string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisplayName ¶
DisplayName checks that a requested display name is valid
func Email ¶
Email makes sure that a given email address is a valid address. Returns an error if not.
func EmojiShortcode ¶
EmojiShortcode just runs the given shortcode through the regular expression for emoji shortcodes, to figure out whether it's a valid shortcode, ie., 2-30 characters, lowercase a-z, numbers, and underscores.
func Language ¶
Language checks that the given language string is a 2- or 3-letter ISO 639 code. Returns an error if the language cannot be parsed. See: https://pkg.go.dev/golang.org/x/text/language
func NewPassword ¶
NewPassword returns an error if the given password is not sufficiently strong, or nil if it's ok.
func SignUpReason ¶
SignUpReason checks that a sufficient reason is given for a server signup request
func SiteDescription ¶
SiteDescription ensures that the given site description is within spec.
func SiteShortDescription ¶
SiteShortDescription ensures that the given site short description is within spec.
func StatusFormat ¶ added in v0.4.0
StatusFormat checks that the desired status format setting is valid.
Types ¶
This section is empty.