Versions in this module Expand all Collapse all v2 v2.7.2 Aug 2, 2024 Changes in this version + func DeleteRule(rules ...string) + func GetRegisteredRuleMap() map[string]RuleFunc + func GetTags() []string + func ParseTagValue(tag string) (field, rule, msg string) + func RegisterRule(rule string, f RuleFunc) + func RegisterRuleByMap(m map[string]RuleFunc) + type CustomMsg = map[string]interface + type Error interface + Code func() gcode.Code + Current func() error + Error func() string + FirstError func() (err error) + FirstItem func() (key string, messages map[string]error) + FirstRule func() (rule string, err error) + Items func() (items []map[string]map[string]error) + Map func() map[string]error + Maps func() map[string]map[string]error + String func() string + Strings func() (errs []string) + type RuleFunc func(ctx context.Context, in RuleFuncInput) error + type RuleFuncInput struct + Data *gvar.Var + Field string + Message string + Rule string + Value *gvar.Var + ValueType reflect.Type + type Validator struct + func New() *Validator + func (v *Validator) Assoc(assoc interface{}) *Validator + func (v *Validator) Bail() *Validator + func (v *Validator) Ci() *Validator + func (v *Validator) Clone() *Validator + func (v *Validator) Data(data interface{}) *Validator + func (v *Validator) Foreach() *Validator + func (v *Validator) I18n(i18nManager *gi18n.Manager) *Validator + func (v *Validator) Messages(messages interface{}) *Validator + func (v *Validator) RuleFunc(rule string, f RuleFunc) *Validator + func (v *Validator) RuleFuncMap(m map[string]RuleFunc) *Validator + func (v *Validator) Rules(rules interface{}) *Validator + func (v *Validator) Run(ctx context.Context) Error