validation

package
v0.0.0-...-11d4248 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DNS1123LabelMaxLength int = 63

DNS1123LabelMaxLength is a label's max length in DNS (RFC 1123)

Variables

This section is empty.

Functions

func CheckName

func CheckName(name string) error

CheckName 校验是否符合DNS规范

func IsDNS1123Label

func IsDNS1123Label(value string) []string

IsDNS1123Label tests for a string that conforms to the definition of a label in DNS (RFC 1123).

func IsValidIP

func IsValidIP(value string) []string

IsValidIP tests that the argument is a valid IP address.

func IsValidWsName

func IsValidWsName(value string) []string

IsValidWsName 是否是合法项目名

func MailDropHasSuffix

func MailDropHasSuffix(mail string) string

MailDropHasSuffix mail drop has suffix

func MaxLenError

func MaxLenError(length int) string

MaxLenError returns a string explanation of a "string too long" validation failure.

func NamespaceValidate

func NamespaceValidate(s string) error

NamespaceValidate returns nil if the string s is a valid namespace.

func RegexError

func RegexError(msg string, fmt string, examples ...string) string

RegexError returns a string explanation of a regex validation failure.

func VerifyEmailFormat

func VerifyEmailFormat(email string) bool

VerifyEmailFormat email verify

func VerifyGitFormat

func VerifyGitFormat(gitaddr string) bool

VerifyGitFormat git addr verify

func VerifyPhoneFormat

func VerifyPhoneFormat(mobileNum string) bool

VerifyPhoneFormat mobile verify

func VerifyTagFormat

func VerifyTagFormat(tagstr string) bool

VerifyTagFormat tag verify

Types

This section is empty.

Jump to

Keyboard shortcuts

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