Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrorTypeMissRequired ErrorTypeNumOutOfRange ErrorTypeLengthOutOfRange ErrorTypeNotMatchRegexp ErrorTypeBadTimeValue ErrorTypeCanNotCastToNum ErrorTypeCanNotCastToBool ErrorTypeBadValueType ErrorTypeTimeOutOfRange )
View Source
const ( RuleTypeInt = RuleType(iota) RuleTypeDouble RuleTypeBool RuleTypeString RuleTypeFile RuleTypeTime RuleTypeBinder )
Variables ¶
This section is empty.
Functions ¶
func RegisterRegexp ¶
Types ¶
type Rule ¶
type Rule struct { Name string RuleType RuleType Gotype reflect.Type IsSlice bool Index []int Optional bool MaxInt *int64 MinInt *int64 MaxDouble *float64 MinDouble *float64 MaxLen *int MinLen *int MaxRuneCount *int MinRuneCount *int NoTrim bool NoEscape bool Regexp *regexp.Regexp TimeLayout string TimeUnit string TimeBegin *time.Time TimeEnd *time.Time }
type Rules ¶
func (*Rules) BindAndValidate ¶
Click to show internal directories.
Click to hide internal directories.