maxDate static method
Validates maximum date.
Implementation
static String? maxDate(DateTime? value, DateTime maxDate, {String? fieldName}) {
if (value == null) return null;
if (value.isAfter(maxDate)) {
return '${fieldName ?? "Date"} must be on or before ${_formatDate(maxDate)}.';
}
return null;
}