DateValidators class
A class that provides date-related validation methods.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
Static Methods
-
date(
String? value, {String fieldName = 'Date'}) → String? -
Validates that the given
valueis a parseable date. -
minimumAge(
String? value, {int minAge = 18}) → String? -
Validates that the date of birth in
valuecorresponds to an age of at leastminAgeyears. -
notInFuture(
String? value, {String fieldName = 'Date'}) → String? -
Validates that the date in
valueis not in the future.