ExactDateValidator class abstract

A class to save a specific validation for a DateTime.

This version of DateValidator is used to validate a DateTime if it is exactly the same as the DateTime passed to valid or invalid.

{@template inexactDates} There can be cases where an inexact date is valid. For example, if the validator is testing for a day in a period with an specific property, there can be an exception for the last day(s) of the period with this property. {@endtemplate}

Inheritance
Implementers
Annotations
  • @immutable

Constructors

ExactDateValidator({bool exact = false})
A class to save a specific validation for a DateTime.
const

Properties

exact bool
Returns whether the DateTime passed to valid or invalid needs to fit exactly a specific date.
final
hashCode int
The hash code for this object.
no setterinherited
inexact bool
Returns whether the DateTime passed to valid or invalid can be inexact.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

filterValidDates(Iterable<DateTime> dates) Iterable<DateTime>
Returns the valid dates for this DateValidator in dates.
inherited
invalid(DateTime date) bool
Returns true if the date is invalid for this DateValidator.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
valid(DateTime date) bool
Returns true if the date is valid for this DateValidator.
inherited
validsIn(Iterable<DateTime> dates) Iterable<DateTime>
Returns the valid dates for this DateValidator in dates.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited