operators

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatBase64

func FormatBase64(base64Str string) bool

FormatBase64 校验Base64编码

func FormatCreditCard

func FormatCreditCard(cardNumber string) bool

FormatCreditCard 校验信用卡号

func FormatHexColor

func FormatHexColor(color string) bool

FormatHexColor 校验十六进制颜色值

func FormatIDCard

func FormatIDCard(idCard string) bool

FormatIDCard 校验身份证号

func FormatJSON

func FormatJSON(jsonStr string) bool

FormatJSON 校验JSON格式

func FormatUUID

func FormatUUID(uuidStr string) bool

FormatUUID 校验UUID

func FormatXML

func FormatXML(xmlStr string) bool

FormatXML 校验XML格式

func IsInteger

func IsInteger(value interface{}) (any, bool)

func IsNumber

func IsNumber(val any) (any, bool)

func ValidateAdvanced

func ValidateAdvanced(operator types.Operator, value any, rule []any) (string, bool)

func ValidateContent

func ValidateContent(operator types.Operator, dataType string, value, valued any, rule []any) (string, bool)

func ValidateDate

func ValidateDate(value any, rule []any) (time.Time, bool)

func ValidateEmail

func ValidateEmail(email string) bool

ValidateEmail 验证邮箱格式

func ValidateFormat

func ValidateFormat(operator types.Operator, value any, rule []any) (string, bool)

func ValidateLength

func ValidateLength(operator types.Operator, value any, rule []any) (string, bool)

func ValidatePhone

func ValidatePhone(phone string) bool

ValidatePhone 验证手机号格式(中国)

func ValidateType

func ValidateType(operator types.Operator, value any, rule []any) (any, string, bool)

func ValidateURL

func ValidateURL(urlStr string) bool

ValidateURL 验证URL格式

Types

This section is empty.

Jump to

Keyboard shortcuts

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