Versions in this module Expand all Collapse all v0 v0.2.0 Nov 10, 2026 Changes in this version + type CurrencyCode string + const AED + const AFN + const ALL + const AMD + const AOA + const ARS + const AUD + const AWG + const AZN + const BAM + const BBD + const BDT + const BHD + const BIF + const BMD + const BND + const BOB + const BOV + const BRL + const BSD + const BTN + const BWP + const BYN + const BZD + const CAD + const CDF + const CHE + const CHF + const CHW + const CLF + const CLP + const CNY + const COP + const COU + const CRC + const CUP + const CVE + const CZK + const DJF + const DKK + const DOP + const DZD + const EGP + const ERN + const ETB + const EUR + const FJD + const FKP + const GBP + const GEL + const GHS + const GIP + const GMD + const GNF + const GTQ + const GYD + const HKD + const HNL + const HTG + const HUF + const IDR + const ILS + const INR + const IQD + const IRR + const ISK + const JMD + const JOD + const JPY + const KES + const KGS + const KHR + const KMF + const KPW + const KRW + const KWD + const KYD + const KZT + const LAK + const LBP + const LKR + const LRD + const LSL + const LYD + const MAD + const MDL + const MGA + const MKD + const MMK + const MNT + const MOP + const MRU + const MUR + const MVR + const MWK + const MXN + const MXV + const MYR + const MZN + const NAD + const NGN + const NIO + const NOK + const NPR + const NZD + const OMR + const PAB + const PEN + const PGK + const PHP + const PKR + const PLN + const PYG + const QAR + const RON + const RSD + const RUB + const RWF + const SAR + const SBD + const SCR + const SDG + const SEK + const SGD + const SHP + const SLE + const SOS + const SRD + const SSP + const STN + const SVC + const SYP + const SZL + const THB + const TJS + const TMT + const TND + const TOP + const TRY + const TTD + const TWD + const TZS + const UAH + const UGX + const USD + const USN + const UYI + const UYU + const UYW + const UZS + const VED + const VES + const VND + const VUV + const WST + const XAD + const XAF + const XAG + const XAU + const XBA + const XBB + const XBC + const XBD + const XCD + const XCG + const XDR + const XOF + const XPD + const XPF + const XPT + const XSU + const XTS + const XUA + const XXX + const YER + const ZAR + const ZMW + const ZWG + type CurrencyField struct + func Currency[T ~string](path string, value T) CurrencyField[T] + func (b CurrencyField[T]) AED() CurrencyField[T] + func (b CurrencyField[T]) AFN() CurrencyField[T] + func (b CurrencyField[T]) ALL() CurrencyField[T] + func (b CurrencyField[T]) AMD() CurrencyField[T] + func (b CurrencyField[T]) AOA() CurrencyField[T] + func (b CurrencyField[T]) ARS() CurrencyField[T] + func (b CurrencyField[T]) AUD() CurrencyField[T] + func (b CurrencyField[T]) AWG() CurrencyField[T] + func (b CurrencyField[T]) AZN() CurrencyField[T] + func (b CurrencyField[T]) BAM() CurrencyField[T] + func (b CurrencyField[T]) BBD() CurrencyField[T] + func (b CurrencyField[T]) BDT() CurrencyField[T] + func (b CurrencyField[T]) BHD() CurrencyField[T] + func (b CurrencyField[T]) BIF() CurrencyField[T] + func (b CurrencyField[T]) BMD() CurrencyField[T] + func (b CurrencyField[T]) BND() CurrencyField[T] + func (b CurrencyField[T]) BOB() CurrencyField[T] + func (b CurrencyField[T]) BOV() CurrencyField[T] + func (b CurrencyField[T]) BRL() CurrencyField[T] + func (b CurrencyField[T]) BSD() CurrencyField[T] + func (b CurrencyField[T]) BTN() CurrencyField[T] + func (b CurrencyField[T]) BWP() CurrencyField[T] + func (b CurrencyField[T]) BYN() CurrencyField[T] + func (b CurrencyField[T]) BZD() CurrencyField[T] + func (b CurrencyField[T]) CAD() CurrencyField[T] + func (b CurrencyField[T]) CDF() CurrencyField[T] + func (b CurrencyField[T]) CHE() CurrencyField[T] + func (b CurrencyField[T]) CHF() CurrencyField[T] + func (b CurrencyField[T]) CHW() CurrencyField[T] + func (b CurrencyField[T]) CLF() CurrencyField[T] + func (b CurrencyField[T]) CLP() CurrencyField[T] + func (b CurrencyField[T]) CNY() CurrencyField[T] + func (b CurrencyField[T]) COP() CurrencyField[T] + func (b CurrencyField[T]) COU() CurrencyField[T] + func (b CurrencyField[T]) CRC() CurrencyField[T] + func (b CurrencyField[T]) CUP() CurrencyField[T] + func (b CurrencyField[T]) CVE() CurrencyField[T] + func (b CurrencyField[T]) CZK() CurrencyField[T] + func (b CurrencyField[T]) Check(check func(context.Context, T) error) CurrencyField[T] + func (b CurrencyField[T]) DJF() CurrencyField[T] + func (b CurrencyField[T]) DKK() CurrencyField[T] + func (b CurrencyField[T]) DOP() CurrencyField[T] + func (b CurrencyField[T]) DZD() CurrencyField[T] + func (b CurrencyField[T]) EGP() CurrencyField[T] + func (b CurrencyField[T]) ERN() CurrencyField[T] + func (b CurrencyField[T]) ETB() CurrencyField[T] + func (b CurrencyField[T]) EUR() CurrencyField[T] + func (b CurrencyField[T]) FJD() CurrencyField[T] + func (b CurrencyField[T]) FKP() CurrencyField[T] + func (b CurrencyField[T]) GBP() CurrencyField[T] + func (b CurrencyField[T]) GEL() CurrencyField[T] + func (b CurrencyField[T]) GHS() CurrencyField[T] + func (b CurrencyField[T]) GIP() CurrencyField[T] + func (b CurrencyField[T]) GMD() CurrencyField[T] + func (b CurrencyField[T]) GNF() CurrencyField[T] + func (b CurrencyField[T]) GTQ() CurrencyField[T] + func (b CurrencyField[T]) GYD() CurrencyField[T] + func (b CurrencyField[T]) HKD() CurrencyField[T] + func (b CurrencyField[T]) HNL() CurrencyField[T] + func (b CurrencyField[T]) HTG() CurrencyField[T] + func (b CurrencyField[T]) HUF() CurrencyField[T] + func (b CurrencyField[T]) IDR() CurrencyField[T] + func (b CurrencyField[T]) ILS() CurrencyField[T] + func (b CurrencyField[T]) INR() CurrencyField[T] + func (b CurrencyField[T]) IQD() CurrencyField[T] + func (b CurrencyField[T]) IRR() CurrencyField[T] + func (b CurrencyField[T]) ISK() CurrencyField[T] + func (b CurrencyField[T]) JMD() CurrencyField[T] + func (b CurrencyField[T]) JOD() CurrencyField[T] + func (b CurrencyField[T]) JPY() CurrencyField[T] + func (b CurrencyField[T]) KES() CurrencyField[T] + func (b CurrencyField[T]) KGS() CurrencyField[T] + func (b CurrencyField[T]) KHR() CurrencyField[T] + func (b CurrencyField[T]) KMF() CurrencyField[T] + func (b CurrencyField[T]) KPW() CurrencyField[T] + func (b CurrencyField[T]) KRW() CurrencyField[T] + func (b CurrencyField[T]) KWD() CurrencyField[T] + func (b CurrencyField[T]) KYD() CurrencyField[T] + func (b CurrencyField[T]) KZT() CurrencyField[T] + func (b CurrencyField[T]) LAK() CurrencyField[T] + func (b CurrencyField[T]) LBP() CurrencyField[T] + func (b CurrencyField[T]) LKR() CurrencyField[T] + func (b CurrencyField[T]) LRD() CurrencyField[T] + func (b CurrencyField[T]) LSL() CurrencyField[T] + func (b CurrencyField[T]) LYD() CurrencyField[T] + func (b CurrencyField[T]) Label(label string) CurrencyField[T] + func (b CurrencyField[T]) MAD() CurrencyField[T] + func (b CurrencyField[T]) MDL() CurrencyField[T] + func (b CurrencyField[T]) MGA() CurrencyField[T] + func (b CurrencyField[T]) MKD() CurrencyField[T] + func (b CurrencyField[T]) MMK() CurrencyField[T] + func (b CurrencyField[T]) MNT() CurrencyField[T] + func (b CurrencyField[T]) MOP() CurrencyField[T] + func (b CurrencyField[T]) MRU() CurrencyField[T] + func (b CurrencyField[T]) MUR() CurrencyField[T] + func (b CurrencyField[T]) MVR() CurrencyField[T] + func (b CurrencyField[T]) MWK() CurrencyField[T] + func (b CurrencyField[T]) MXN() CurrencyField[T] + func (b CurrencyField[T]) MXV() CurrencyField[T] + func (b CurrencyField[T]) MYR() CurrencyField[T] + func (b CurrencyField[T]) MZN() CurrencyField[T] + func (b CurrencyField[T]) Message(message string) CurrencyField[T] + func (b CurrencyField[T]) NAD() CurrencyField[T] + func (b CurrencyField[T]) NGN() CurrencyField[T] + func (b CurrencyField[T]) NIO() CurrencyField[T] + func (b CurrencyField[T]) NOK() CurrencyField[T] + func (b CurrencyField[T]) NPR() CurrencyField[T] + func (b CurrencyField[T]) NZD() CurrencyField[T] + func (b CurrencyField[T]) OMR() CurrencyField[T] + func (b CurrencyField[T]) PAB() CurrencyField[T] + func (b CurrencyField[T]) PEN() CurrencyField[T] + func (b CurrencyField[T]) PGK() CurrencyField[T] + func (b CurrencyField[T]) PHP() CurrencyField[T] + func (b CurrencyField[T]) PKR() CurrencyField[T] + func (b CurrencyField[T]) PLN() CurrencyField[T] + func (b CurrencyField[T]) PYG() CurrencyField[T] + func (b CurrencyField[T]) QAR() CurrencyField[T] + func (b CurrencyField[T]) RON() CurrencyField[T] + func (b CurrencyField[T]) RSD() CurrencyField[T] + func (b CurrencyField[T]) RUB() CurrencyField[T] + func (b CurrencyField[T]) RWF() CurrencyField[T] + func (b CurrencyField[T]) Required() CurrencyField[T] + func (b CurrencyField[T]) RequiredIf(condition bool) CurrencyField[T] + func (b CurrencyField[T]) SAR() CurrencyField[T] + func (b CurrencyField[T]) SBD() CurrencyField[T] + func (b CurrencyField[T]) SCR() CurrencyField[T] + func (b CurrencyField[T]) SDG() CurrencyField[T] + func (b CurrencyField[T]) SEK() CurrencyField[T] + func (b CurrencyField[T]) SGD() CurrencyField[T] + func (b CurrencyField[T]) SHP() CurrencyField[T] + func (b CurrencyField[T]) SLE() CurrencyField[T] + func (b CurrencyField[T]) SOS() CurrencyField[T] + func (b CurrencyField[T]) SRD() CurrencyField[T] + func (b CurrencyField[T]) SSP() CurrencyField[T] + func (b CurrencyField[T]) STN() CurrencyField[T] + func (b CurrencyField[T]) SVC() CurrencyField[T] + func (b CurrencyField[T]) SYP() CurrencyField[T] + func (b CurrencyField[T]) SZL() CurrencyField[T] + func (b CurrencyField[T]) THB() CurrencyField[T] + func (b CurrencyField[T]) TJS() CurrencyField[T] + func (b CurrencyField[T]) TMT() CurrencyField[T] + func (b CurrencyField[T]) TND() CurrencyField[T] + func (b CurrencyField[T]) TOP() CurrencyField[T] + func (b CurrencyField[T]) TRY() CurrencyField[T] + func (b CurrencyField[T]) TTD() CurrencyField[T] + func (b CurrencyField[T]) TWD() CurrencyField[T] + func (b CurrencyField[T]) TZS() CurrencyField[T] + func (b CurrencyField[T]) UAH() CurrencyField[T] + func (b CurrencyField[T]) UGX() CurrencyField[T] + func (b CurrencyField[T]) USD() CurrencyField[T] + func (b CurrencyField[T]) USN() CurrencyField[T] + func (b CurrencyField[T]) UYI() CurrencyField[T] + func (b CurrencyField[T]) UYU() CurrencyField[T] + func (b CurrencyField[T]) UYW() CurrencyField[T] + func (b CurrencyField[T]) UZS() CurrencyField[T] + func (b CurrencyField[T]) Using(rule Rule[T]) CurrencyField[T] + func (b CurrencyField[T]) VED() CurrencyField[T] + func (b CurrencyField[T]) VES() CurrencyField[T] + func (b CurrencyField[T]) VND() CurrencyField[T] + func (b CurrencyField[T]) VUV() CurrencyField[T] + func (b CurrencyField[T]) WST() CurrencyField[T] + func (b CurrencyField[T]) XAD() CurrencyField[T] + func (b CurrencyField[T]) XAF() CurrencyField[T] + func (b CurrencyField[T]) XAG() CurrencyField[T] + func (b CurrencyField[T]) XAU() CurrencyField[T] + func (b CurrencyField[T]) XBA() CurrencyField[T] + func (b CurrencyField[T]) XBB() CurrencyField[T] + func (b CurrencyField[T]) XBC() CurrencyField[T] + func (b CurrencyField[T]) XBD() CurrencyField[T] + func (b CurrencyField[T]) XCD() CurrencyField[T] + func (b CurrencyField[T]) XCG() CurrencyField[T] + func (b CurrencyField[T]) XDR() CurrencyField[T] + func (b CurrencyField[T]) XOF() CurrencyField[T] + func (b CurrencyField[T]) XPD() CurrencyField[T] + func (b CurrencyField[T]) XPF() CurrencyField[T] + func (b CurrencyField[T]) XPT() CurrencyField[T] + func (b CurrencyField[T]) XSU() CurrencyField[T] + func (b CurrencyField[T]) XTS() CurrencyField[T] + func (b CurrencyField[T]) XUA() CurrencyField[T] + func (b CurrencyField[T]) XXX() CurrencyField[T] + func (b CurrencyField[T]) YER() CurrencyField[T] + func (b CurrencyField[T]) ZAR() CurrencyField[T] + func (b CurrencyField[T]) ZMW() CurrencyField[T] + func (b CurrencyField[T]) ZWG() CurrencyField[T] + type DecimalField struct + func Decimal[T ~string](path string, value T) DecimalField[T] + func (b DecimalField[T]) Check(check func(context.Context, T) error) DecimalField[T] + func (b DecimalField[T]) Equal(other T) DecimalField[T] + func (b DecimalField[T]) GreaterThan(other T) DecimalField[T] + func (b DecimalField[T]) Label(label string) DecimalField[T] + func (b DecimalField[T]) LessThan(other T) DecimalField[T] + func (b DecimalField[T]) Max(max T) DecimalField[T] + func (b DecimalField[T]) MaxScale(max int) DecimalField[T] + func (b DecimalField[T]) Message(message string) DecimalField[T] + func (b DecimalField[T]) Min(min T) DecimalField[T] + func (b DecimalField[T]) Required() DecimalField[T] + func (b DecimalField[T]) RequiredIf(condition bool) DecimalField[T] + func (b DecimalField[T]) Using(rule Rule[T]) DecimalField[T] v0.1.0 Nov 10, 2026 Changes in this version + func Validate(fields ...Field) error + func ValidateContext(ctx context.Context, fields ...Field) error + type BoolField struct + func Bool[T ~bool](path string, value T) BoolField[T] + func (b BoolField[T]) Accepted() BoolField[T] + func (b BoolField[T]) Check(check func(context.Context, T) error) BoolField[T] + func (b BoolField[T]) Equal(other T) BoolField[T] + func (b BoolField[T]) Label(label string) BoolField[T] + func (b BoolField[T]) Message(message string) BoolField[T] + func (b BoolField[T]) Using(rule Rule[T]) BoolField[T] + type ConfigurationError struct + Path string + Problem string + func (e *ConfigurationError) Error() string + type ContextRuleFunc func(context.Context, T) error + func (f ContextRuleFunc[T]) Validate(value T) error + func (f ContextRuleFunc[T]) ValidateContext(ctx context.Context, value T) error + type Errors struct + func (e *Errors) Error() string + func (e *Errors) First(path string) string + func (e *Errors) Issues() []Issue + func (e *Errors) Messages() map[string][]string + type Field interface + func Group(path string, fields ...Field) Field + func Optional[T any](value *T, build func(T) Field) Field + func When(condition bool, makeField func() Field) Field + type Input struct + func Null[T any]() Input[T] + func Provided[T any](value T) Input[T] + func (i *Input[T]) UnmarshalJSON(data []byte) error + func (i Input[T]) Get() (T, bool) + func (i Input[T]) IsNull() bool + func (i Input[T]) IsPresent() bool + func (i Input[T]) IsZero() bool + func (i Input[T]) MarshalJSON() ([]byte, error) + type Issue struct + Code string + Message string + Parameters map[string]string + Path string + type MapField struct + func Map[T any](path string, value map[string]T) MapField[T] + func (b MapField[T]) Check(check func(context.Context, map[string]T) error) MapField[T] + func (b MapField[T]) Each(fields func(string, T) []Field) MapField[T] + func (b MapField[T]) HasKey(key string) MapField[T] + func (b MapField[T]) Label(label string) MapField[T] + func (b MapField[T]) Len(length int) MapField[T] + func (b MapField[T]) Max(max int) MapField[T] + func (b MapField[T]) Message(message string) MapField[T] + func (b MapField[T]) Min(min int) MapField[T] + func (b MapField[T]) OnlyKeys(keys ...string) MapField[T] + func (b MapField[T]) Required() MapField[T] + func (b MapField[T]) RequiredIf(condition bool) MapField[T] + func (b MapField[T]) Using(rule Rule[map[string]T]) MapField[T] + type NumberField struct + func Number[T Numeric](path string, value T) NumberField[T] + func (b NumberField[T]) Check(check func(context.Context, T) error) NumberField[T] + func (b NumberField[T]) Equal(other T) NumberField[T] + func (b NumberField[T]) GreaterThan(other T) NumberField[T] + func (b NumberField[T]) In(values ...T) NumberField[T] + func (b NumberField[T]) Label(label string) NumberField[T] + func (b NumberField[T]) LessThan(other T) NumberField[T] + func (b NumberField[T]) Max(max T) NumberField[T] + func (b NumberField[T]) Message(message string) NumberField[T] + func (b NumberField[T]) Min(min T) NumberField[T] + func (b NumberField[T]) MultipleOf(divisor T) NumberField[T] + func (b NumberField[T]) NotEqual(other T) NumberField[T] + func (b NumberField[T]) NotIn(values ...T) NumberField[T] + func (b NumberField[T]) Using(rule Rule[T]) NumberField[T] + type Numeric interface + type PresenceField struct + func Presence[T any](path string, input Input[T], build func(T) Field) PresenceField[T] + func (b PresenceField[T]) Label(label string) PresenceField[T] + func (b PresenceField[T]) Message(message string) PresenceField[T] + func (b PresenceField[T]) Nullable() PresenceField[T] + func (b PresenceField[T]) Required() PresenceField[T] + func (b PresenceField[T]) RequiredIf(condition bool) PresenceField[T] + type Rule interface + Validate func(value T) error + func All[T any](rules ...Rule[T]) Rule[T] + func Any[T any](rules ...Rule[T]) Rule[T] + func Not[T any](rule Rule[T]) Rule[T] + func UniqueBy[T any, K comparable](key func(T) K) Rule[[]T] + type RuleFunc func(T) error + func (f RuleFunc[T]) Validate(value T) error + type RuleWithContext interface + ValidateContext func(ctx context.Context, value T) error + type SliceField struct + func Slice[T any](path string, value []T) SliceField[T] + func (b SliceField[T]) Check(check func(context.Context, []T) error) SliceField[T] + func (b SliceField[T]) Contains(target T) SliceField[T] + func (b SliceField[T]) Each(fields func(T) []Field) SliceField[T] + func (b SliceField[T]) Label(label string) SliceField[T] + func (b SliceField[T]) Len(length int) SliceField[T] + func (b SliceField[T]) Max(max int) SliceField[T] + func (b SliceField[T]) Message(message string) SliceField[T] + func (b SliceField[T]) Min(min int) SliceField[T] + func (b SliceField[T]) NotContains(target T) SliceField[T] + func (b SliceField[T]) Required() SliceField[T] + func (b SliceField[T]) RequiredIf(condition bool) SliceField[T] + func (b SliceField[T]) Unique() SliceField[T] + func (b SliceField[T]) Using(rule Rule[[]T]) SliceField[T] + type StringField struct + func String[T ~string](path string, value T) StringField[T] + func (b StringField[T]) Check(check func(context.Context, T) error) StringField[T] + func (b StringField[T]) Contains(text string) StringField[T] + func (b StringField[T]) EndsWith(suffix string) StringField[T] + func (b StringField[T]) Equal(other T) StringField[T] + func (b StringField[T]) In(values ...T) StringField[T] + func (b StringField[T]) IsASCII() StringField[T] + func (b StringField[T]) IsAlpha() StringField[T] + func (b StringField[T]) IsAlphanumeric() StringField[T] + func (b StringField[T]) IsBase64() StringField[T] + func (b StringField[T]) IsBase64URL() StringField[T] + func (b StringField[T]) IsCIDR() StringField[T] + func (b StringField[T]) IsDate(layout string) StringField[T] + func (b StringField[T]) IsDateIn(layout string, location *time.Location) StringField[T] + func (b StringField[T]) IsDigits() StringField[T] + func (b StringField[T]) IsE164() StringField[T] + func (b StringField[T]) IsEmail() StringField[T] + func (b StringField[T]) IsHostname() StringField[T] + func (b StringField[T]) IsIP() StringField[T] + func (b StringField[T]) IsIPv4() StringField[T] + func (b StringField[T]) IsIPv6() StringField[T] + func (b StringField[T]) IsJSON() StringField[T] + func (b StringField[T]) IsLowercase() StringField[T] + func (b StringField[T]) IsMAC() StringField[T] + func (b StringField[T]) IsULID() StringField[T] + func (b StringField[T]) IsURL() StringField[T] + func (b StringField[T]) IsUTF8() StringField[T] + func (b StringField[T]) IsUUID() StringField[T] + func (b StringField[T]) IsUUIDv4() StringField[T] + func (b StringField[T]) IsUUIDv7() StringField[T] + func (b StringField[T]) IsUppercase() StringField[T] + func (b StringField[T]) Label(label string) StringField[T] + func (b StringField[T]) Len(length int) StringField[T] + func (b StringField[T]) Match(pattern *regexp.Regexp) StringField[T] + func (b StringField[T]) Max(max int) StringField[T] + func (b StringField[T]) Message(message string) StringField[T] + func (b StringField[T]) Min(min int) StringField[T] + func (b StringField[T]) NotBlank() StringField[T] + func (b StringField[T]) NotContains(text string) StringField[T] + func (b StringField[T]) NotEqual(other T) StringField[T] + func (b StringField[T]) NotIn(values ...T) StringField[T] + func (b StringField[T]) Required() StringField[T] + func (b StringField[T]) RequiredIf(condition bool) StringField[T] + func (b StringField[T]) StartsWith(prefix string) StringField[T] + func (b StringField[T]) Using(rule Rule[T]) StringField[T] + type TimeField struct + func Time(path string, value time.Time) TimeField + func (b TimeField) After(other time.Time) TimeField + func (b TimeField) Before(other time.Time) TimeField + func (b TimeField) Check(check func(context.Context, time.Time) error) TimeField + func (b TimeField) Equal(other time.Time) TimeField + func (b TimeField) Label(label string) TimeField + func (b TimeField) Max(max time.Time) TimeField + func (b TimeField) Message(message string) TimeField + func (b TimeField) Min(min time.Time) TimeField + func (b TimeField) Required() TimeField + func (b TimeField) RequiredIf(condition bool) TimeField + func (b TimeField) Using(rule Rule[time.Time]) TimeField + type Validator struct + func New() Validator + func (v Validator) CollectAll() Validator + func (v Validator) FormatMessages(format func(Issue) string) Validator + func (v Validator) StopOnFirstError() Validator + func (v Validator) Validate(fields ...Field) error + func (v Validator) ValidateContext(ctx context.Context, fields ...Field) error + type ValueField struct + func Value[T any](path string, value T) ValueField[T] + func (b ValueField[T]) Check(check func(context.Context, T) error) ValueField[T] + func (b ValueField[T]) Label(label string) ValueField[T] + func (b ValueField[T]) Message(message string) ValueField[T] + func (b ValueField[T]) Using(rule Rule[T]) ValueField[T] + type Violation = violation.Violation + func Invalid(code, message string) *Violation