Documentation
¶
Index ¶
- Variables
- func ContainsChinese(s string) bool
- func EmptyToDefault(str string, defaultStr string) string
- func Eq(mark string) string
- func Ge(mark string) string
- func Gt(mark string) string
- func HasEmpty(elems []interface{}) (bool, int)
- func IsAllEmpty(elems []interface{}) bool
- func IsEmptyValue(v reflect.Value) bool
- func IsUndefined(str string) bool
- func Le(mark string) string
- func Lt(mark string) string
- func Ne(mark string) string
- func NotEmpty() string
- func RegexpMatch(rule string) string
- func RegisterRule(key string, rule Rules) (err error)
- func Verify(st interface{}, roleMap Rules) (err error)
- type Rules
- type RulesMap
Constants ¶
This section is empty.
Variables ¶
View Source
var CustomizeMap = make(map[string]Rules)
Functions ¶
func EmptyToDefault ¶
EmptyToDefault 如果字符串是"",则返回指定默认字符串,否则返回字符串本身。
func IsUndefined ¶
IsUndefined 检查字符串是否等于 "undefined"(不区分大小写,忽略前后空格)
func RegisterRule ¶
RegisterRule 注册自定义规则方案建议在路由初始化层即注册
Types ¶
Click to show internal directories.
Click to hide internal directories.