Versions in this module Expand all Collapse all v0 v0.0.1 Jun 25, 2026 Changes in this version + func DefaultRuleByType(t reflect.Type) string + func IsValidationError(err error) bool + func Register(p Provider) + func UnmarshalDecode(d *jsontext.Decoder, v any, o ...json.Options) error + func WrapLocationError(err error, location string) error + func WrapPositionError[Pos ~string](err error, position Pos) error + type Error int8 + const ERROR_UNDEFINED + const ERROR__DEC_INVALID_INPUT + const ERROR__INPUT_TYPE + const ERROR__INPUT_VALUE + const ERROR__MAP_PARAM + const ERROR__MISSING_REQUIRED + const ERROR__NOT_MATCH_REGEXP + const ERROR__SLICE_PARAM + const ERROR__STRING_LENGTH_MODE + const ERROR__UNREGISTERED_RULE + func (e Error) Message() string + type LocationError struct + func (e *LocationError) Error() string + func (e *LocationError) Location() string + func (e *LocationError) Unwrap() error + type Option struct + Rule rule.Rule + Text bool + Type reflect.Type + type PositionError struct + func (e *PositionError) Error() string + func (e *PositionError) Position() string + func (e *PositionError) Unwrap() error + type PostValidator interface + PostValidate func(reflect.Value) error + type Provider interface + Name func() string + New func(rule.Rule) (Validator, error) + Variants func() []string + type TagValidator interface + ValidationTag func() string + type UnmarshalDecoder interface + UnmarshalDecode func(d *jsontext.Decoder, o ...json.Options) error + func Any(rv reflect.Value, va Validator) UnmarshalDecoder + func Array(rv reflect.Value, va Validator) UnmarshalDecoder + func Basic(rv reflect.Value, va Validator) UnmarshalDecoder + func Map(rv reflect.Value, va Validator) UnmarshalDecoder + func Pointer(rv reflect.Value, va Validator) UnmarshalDecoder + func Struct(rv reflect.Value, va Validator) UnmarshalDecoder + func Text(rv reflect.Value, va Validator) UnmarshalDecoder + func Value(rv reflect.Value, va Validator) UnmarshalDecoder + type Validator interface + String func() string + Validate func([]byte) error + func New(option Option) (Validator, error) + func NewFromStructField(f *scanner.Field) (Validator, error) + type WithDefaults interface + Defaults func() []byte + type WithElemRule interface + ElemRule func() rule.Rule + type WithKeyRule interface + KeyRule func() rule.Rule + type WithOptional interface + Optional func() bool