DateRangeValidator class
A validator for checking if a date falls within a specified date range.
- Inheritance
-
- Object
- FieldValidator<
DateTime> - BoundedFieldValidator<
DateTime, DateTime> - DateRangeValidator
Constructors
-
DateRangeValidator({DateTime? min, DateTime? max, String? errorMessage, BoundsMessageBuilder<
DateTime> ? errorMessageBuilder})
Properties
- errorMessage → String?
-
Overrides this validator's default error message.
finalinherited
-
errorMessageBuilder
→ BoundsMessageBuilder<
DateTime> ? -
Overrides this validator's default error message, with access to
BoundsViolation, min and max. Takes precedence over errorMessage.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- max → DateTime?
-
finalinherited
- min → DateTime?
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
DateTime? value) → String? -
override
-
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.
inherited
-
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