invalid method
Returns true if the date is invalid for the every (if it is a
DateValidator, like an EveryDateValidator, for example) and valid for
the invalidator.
This is the opposite of valid. Implementations that return true for invalid should also return false for valid.
Usually, this will be implemented as !valid(date) by the Every classes
that implement DateValidatorMixin. However, if there is a simpler way to
check for invalid dates, it can be implemented here.
Implementation
@override
bool invalid(DateTime date) {
if (every is DateValidator) {
final invalid = (every as DateValidator).invalid(date);
if (invalid) return true;
}
return invalidator.valid(date);
}