validateValue method

  1. @override
String? validateValue(
  1. DateTime? valueCandidate
)
override

Validates the value. Returns null if the value is valid, otherwise an error message. Call validate() instead of this method when using the validator.

Implementation

@override
String? validateValue(DateTime? valueCandidate) {
  if (valueCandidate == null) {
    return errorText;
  }
  return null;
}