BoundedFieldValidator<T, V> class
abstract
Shared base for validators that check a value against a min/max bound (e.g. length or numeric/date range).
Provides both a plain FieldValidator.errorMessage override and a more flexible errorMessageBuilder for messages that depend on which bound was violated and/or on min/max themselves.
- Inheritance
-
- Object
- FieldValidator<
T> - BoundedFieldValidator
- Implementers
Constructors
-
BoundedFieldValidator({V? min, V? max, BoundsMessageBuilder<
V> ? errorMessageBuilder, String? errorMessage})
Properties
- errorMessage → String?
-
Overrides this validator's default error message.
finalinherited
-
errorMessageBuilder
→ BoundsMessageBuilder<
V> ? -
Overrides this validator's default error message, with access to
BoundsViolation, min and max. Takes precedence over errorMessage.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- max → V?
-
final
- min → V?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
T? value) → String? -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveBoundsError(
BoundsViolation violation, String defaultMessage()) → String - Resolves the message to report for a failed bounds check.
-
resolveErrorMessage(
String defaultMessage) → String -
Resolves the message to report for a failed validation.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited