Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Constraint ¶
type Constraint interface {
Validate(value any, field string) ValidationError
}
type ParameterizedConstraint ¶ added in v1.15.0
type ParameterizedConstraint interface {
Constraint
WithParams(params map[string]string) (Constraint, error)
}
ParameterizedConstraint is implemented by constraints that accept tag parameters (for example min(value=2)). WithParams returns a NEW constraint configured from the given parameters and must not mutate the receiver; a rule whose parameters cannot be consumed fails closed.
Click to show internal directories.
Click to hide internal directories.