utils/validators library

Classes

BoundedFieldValidator<T, V>
Shared base for validators that check a value against a min/max bound (e.g. length or numeric/date range).
CombinedFieldValidator<T>
A validator that combines multiple validators.
DateRangeValidator
A validator for checking if a date falls within a specified date range.
DependentValidator<T>
A validator that depends on another validator.
EmailFieldValidator
A validator for checking if a value is a valid email address.
FieldMatchValidator<T>
A validator for checking if a value matches another field's value.
FieldValidator<T>
A generic abstract class representing a field validator.
LengthValidator<T>
A validator for checking the length of a value.
ListLengthValidator
A validator for checking the length of a list.
RangeValidator
A validator for checking if a numeric value falls within a specified range.
RequiredValidator<T>
A validator for checking if a value is required.

Enums

BoundsViolation
Which bound a value violated, passed to a BoundsMessageBuilder.

Typedefs

BoundsMessageBuilder<V> = String Function(BoundsViolation violation, V? min, V? max)
Builds a custom error message for a failed bounds check.
FieldMatchMessageBuilder = String Function(String fieldName)
Builds a custom error message for a failed FieldMatchValidator check.