Versions in this module Expand all Collapse all v1 v1.1.3 Jun 12, 2021 v1.1.2 Jun 11, 2021 Changes in this version + const ERR_ALPHA_DASH + const ERR_ALPHA_DASH_DOT + const ERR_BOOLEAN_TYPE + const ERR_CONTENT_TYPE + const ERR_DEFAULT + const ERR_DESERIALIZATION + const ERR_EMAIL + const ERR_EXCLUDE + const ERR_FLOAT_TYPE + const ERR_IN + const ERR_INCLUDE + const ERR_INTERGER_TYPE + const ERR_MAX_SIZE + const ERR_MIN_SIZE + const ERR_NOT_INT + const ERR_RANGE + const ERR_REQUIRED + const ERR_SIZE + const ERR_URL + const STATUS_UNPROCESSABLE_ENTITY + var AlphaDashDotPattern = regexp.MustCompile(`[^\d\w-_\.]`) + var AlphaDashPattern = regexp.MustCompile(`[^\d\w-_]`) + var CustomErrorHandler func(flamego.Context, Errors) + var EmailPattern = regexp.MustCompile(...) + var URLPattern = regexp.MustCompile(...) + func AddParamRule(r *ParamRule) + func AddRule(r *Rule) + func Bind(obj interface{}, ifacePtr ...interface{}) flamego.Handler + func BindIgnErr(obj interface{}, ifacePtr ...interface{}) flamego.Handler + func Form(formStruct interface{}, ifacePtr ...interface{}) flamego.Handler + func Json(jsonStruct interface{}, ifacePtr ...interface{}) flamego.Handler + func SetNameMapper(nm NameMapper) + func Validate(obj interface{}) flamego.Handler + type Error struct + Classification string + FieldNames []string + Message string + func (e Error) Error() string + func (e Error) Fields() []string + func (e Error) Kind() string + type ErrorHandler interface + Error func(flamego.Context, Errors) + type Errors []Error + func RawValidate(obj interface{}) Errors + func (e *Errors) Add(fieldNames []string, classification, message string) + func (e *Errors) Has(class string) bool + func (e *Errors) Len() int + type NameMapper func(string) string + type ParamRule struct + IsMatch func(string) bool + IsValid func(Errors, string, string, interface{}) (bool, Errors) + type ParamRuleMapper []*ParamRule + type Rule struct + IsMatch func(string) bool + IsValid func(Errors, string, interface{}) (bool, Errors) + type RuleMapper []*Rule + type Validator interface + Validate func(flamego.Context, Errors) Errors