Skip to main content

Module validator

Module validator 

Source
Expand description

Constraint validation for DTOs and commands.

Structs§

ConstraintViolationList
Ordered list of Violations.
Length
Enforces a string length range (inclusive).
MessengerValidateHook
Maps message names to typed Validatable payloads and rejects on violations.
NotBlank
Rejects empty or whitespace-only strings.
Range
Enforces an inclusive numeric range for a parsed i64.
RecursiveValidator
Default validator that applies each constraint in order.
Violation
One failed constraint on a property path.

Enums§

ValidatorError
Failure while running constraints.

Traits§

Constraint
A rule that may append violations for a value.
Validatable
Object that can validate itself through a Validator.
Validator
Runs constraints and returns a violation list.