Documentation
¶
Index ¶
- func CheckEmail(value interface{}) bool
- func CheckFloat64Range(value interface{}, min, max float64) bool
- func CheckIPv4(value interface{}) bool
- func CheckIntRange(value interface{}, min, max int) bool
- func CheckLen(value interface{}, length int) bool
- func CheckMax(value interface{}, max float64) bool
- func CheckMaxSize(value interface{}, maxSize int) bool
- func CheckMin(value interface{}, min float64) bool
- func CheckMinSize(value interface{}, minSize int) bool
- func CheckMobile(value interface{}) bool
- func CheckRealNumber(value interface{}) bool
- func CheckRegexp(value interface{}, rex string) bool
- func CheckType(value interface{}, expectType string) bool
- func IsArray(value interface{}) bool
- func IsValidBoolean(s string) bool
- func IsValidNumber(s string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckFloat64Range ¶
检查float数据的区间(开区间)
func CheckMaxSize ¶
检查传入的值的长度,仅支持string、slice或者map 计算String的时候,以正则实现,中文字符算长度1
func CheckMinSize ¶
检查传入的值的长度,仅支持string、slice或者map 计算String的时候,以正则实现,中文字符算长度1
func CheckRegexp ¶
根据正则检查字符串,如果传入的不是string类型,则使用Sprintf处理成字符串再校验。
func IsValidBoolean ¶
检查字符串是否代表一个合法的bool值 注意返回值仅表示是不是布尔值,并不表示布尔值本身的含义
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.