check

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashString

func HashString(str string) string

HashString hash字符串

func InNumRange added in v0.1.10

func InNumRange(val interface{}, min, max float64) bool

func IntToByte

func IntToByte(data int, len uintptr) (ret []byte)

IntToByte 整型转字节数组

func IsEmail

func IsEmail(email string) (err error)

func IsIP

func IsIP(ip string) bool

func IsMobile

func IsMobile(mobile string) bool

func IsNumeric

func IsNumeric(val interface{}) bool

IsNumeric 验证数字类型

func IsOpenid

func IsOpenid(openid string) (err error)

func IsQQNumber

func IsQQNumber(qq string) (err error)

func IsSQLInject

func IsSQLInject(toMatchStr string) bool

IsSQLInject 正则过滤sql注入的方法

func IsValidField

func IsValidField(field string) (err error)

IsValidField 检查合法输入, 白名单, 汉字, 数字, 字母,下划线,点

func IsValidFields added in v0.1.8

func IsValidFields(fields ...string) (err error)

func IsValidIDCardCheckSum

func IsValidIDCardCheckSum(idCard string) bool

IsValidIDCardCheckSum 增加了尾号校验

func IsValidIDCardNumber

func IsValidIDCardNumber(id string) bool

IsValidIDCardNumber 只能用到2099年, 到达2100年就会出错

func SaltMD5

func SaltMD5(str string) (md5str string)

SaltMD5 md5 hash

Types

This section is empty.

Jump to

Keyboard shortcuts

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