validators/date library

Date Validators

This file contains validators for working with DateTime values.

Functions

isDateAfter(DateTime dt, {bool inclusive = false, String? message}) IValidator
DateTime must be after (or equal if inclusive) given bound.
isDateBefore(DateTime dt, {bool inclusive = false, String? message}) IValidator
DateTime must be before (or equal if inclusive) given bound.
isDateBetween(DateTime start, DateTime end, {bool inclusiveStart = true, bool inclusiveEnd = true, String? message}) IValidator
DateTime must fall within the interval.
isDateInFuture({bool allowNow = true, String? message}) IValidator
DateTime must be in the future.
isDateInPast({bool allowNow = true, String? message}) IValidator
DateTime must be in the past.
isDateSameDay(DateTime dt, {String? message}) IValidator
DateTime must be same calendar day.