Versions in this module Expand all Collapse all v1 v1.0.0 Dec 22, 2022 Changes in this version + var ErrInvalidValidationType = errors.New("invalid validation type") + func Validate(t ValidationType, rules Rules, r io.Reader) error + type Rule []RuleElement + type RuleElement func(p RuleElementParameter) ValidationError + func Array() RuleElement + func Base32() RuleElement + func Base64() RuleElement + func Boolean() RuleElement + func BooleanString() RuleElement + func Contains(str string) RuleElement + func DivisibleBy(number float64) RuleElement + func Email() RuleElement + func Empty() RuleElement + func Equals(value any) RuleElement + func Float() RuleElement + func FloatString() RuleElement + func If(ruleElement RuleElement) RuleElement + func IfNot(ruleElement RuleElement) RuleElement + func Integer() RuleElement + func IntegerString() RuleElement + func Length(min, max int) RuleElement + func Max(maxNumber float64) RuleElement + func MaxLength(max int) RuleElement + func Min(minNumber float64) RuleElement + func MinLength(min int) RuleElement + func Negative() RuleElement + func NotContains(str string) RuleElement + func NotEmpty() RuleElement + func NotEquals(value any) RuleElement + func NotNull() RuleElement + func OnlyASCII() RuleElement + func OnlyAlpha() RuleElement + func OnlyAlphanumeric() RuleElement + func Positive() RuleElement + func String() RuleElement + type RuleElementParameter struct + Field string + RValue reflect.Value + Value any + type Rules map[string]Rule + type ValidationError struct + Field string + Message string + func NewValidationError(field, message string, args ...any) ValidationError + func NilValidationError() ValidationError + func (err ValidationError) Error() string + func (err ValidationError) Nil() bool + type ValidationErrors []ValidationError + func (err ValidationErrors) Error() string + type ValidationType uint8 + const JSONValidation