Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegRule ¶
rule format: eq:int:1,2 (eq is rule name, int is param type, 1, 2 are params)
rule names: eq,eq_feild,ge,gt,le,len,lt,minlen,maxlen,regx
func Register ¶
func Register(r rule.RuleInterface)
Types ¶
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func NewValidator ¶
func NewValidator() *Validator
func (*Validator) Add ¶
func (v *Validator) Add(valid rule.RuleInterface)
Click to show internal directories.
Click to hide internal directories.