sameDay<E> static method
Validates that the date is on the same day as date.
DateRules.sameDay(targetDate, error: 'Must be on the same day')
Implementation
static Rule<DateTime, E> sameDay<E>(DateTime date, {required E error}) =>
PredicateRule(
predicate: (value) =>
value.year == date.year &&
value.month == date.month &&
value.day == date.day,
error: error,
);