isValid method
checks the input against the given conditions
Implementation
@override
bool isValid(String? value) {
try {
final DateTime? dateTime = DateFormat(format).parseStrict(value!);
return dateTime != null;
} catch (_) {
return false;
}
}