valid

package
v1.8.51 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidEmailFormat = errors.New("invalid email format")
	ErrUnresolvableDomain = errors.New("domain cannot be resolved")
)

定义错误变量

View Source
var (
	ErrInvalidMD5Length  = errors.New("invalid length for MD5 hash")
	ErrInvalidMD5Pattern = errors.New("value does not match MD5 hash pattern")
)

校验是否 MD5 字符串的错误定义

Functions

func EmailAddr

func EmailAddr(email string) error

EmailAddr 校验邮件地址格式和域名是否可解析

func IsDomainResolvable

func IsDomainResolvable(domain string) bool

IsDomainResolvable 校验域名是否可解析

func IsMd5 added in v1.8.45

func IsMd5(input string) error

IsMd5 验证字符串是否是有效的 MD5 值

func IsValidEmailFormat

func IsValidEmailFormat(email string) bool

IsValidEmailFormat 校验邮件地址格式是否合法

Types

This section is empty.

Jump to

Keyboard shortcuts

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