DateValidationConfig class final
Configuration options for date and time validation.
Constructors
- DateValidationConfig({bool allowEmpty = false, bool trimWhitespace = true, bool mustBePast = false, bool mustBeFuture = false, bool mustBeToday = false, bool mustBeWeekday = false, bool mustBeWeekend = false, bool mustBeLeapYear = false, bool mustBeTime = false, DateTime? minDate, DateTime? maxDate})
-
Creates a DateValidationConfig.
const
Properties
- allowEmpty → bool
-
Whether an empty string is considered valid.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxDate → DateTime?
-
Maximum allowable UTC DateTime.
final
- minDate → DateTime?
-
Minimum allowable UTC DateTime.
final
- mustBeFuture → bool
-
Requires parsed date to be strictly in the future.
final
- mustBeLeapYear → bool
-
Requires parsed date to be in a leap year.
final
- mustBePast → bool
-
Requires parsed date to be strictly in the past.
final
- mustBeTime → bool
-
Requires input to match 24-hour time format (
HH:mmorHH:mm:ss).final - mustBeToday → bool
-
Requires parsed date to match today's UTC date.
final
- mustBeWeekday → bool
-
Requires parsed date to fall on a weekday (Monday–Friday).
final
- mustBeWeekend → bool
-
Requires parsed date to fall on a weekend (Saturday/Sunday).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- trimWhitespace → bool
-
Whether input should be trimmed before parsing.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited