weekday<E> static method
Validates that the date falls on specific weekdays.
days should be a list of weekday numbers (1 = Monday, 7 = Sunday).
DateRules.weekday([1, 2, 3, 4, 5], error: 'Must be a weekday')
Implementation
static Rule<DateTime, E> weekday<E>(List<int> days, {required E error}) =>
PredicateRule(
predicate: (value) => days.contains(value.weekday),
error: error,
);