date static method

FormFieldValidator<String> date({
  1. String? errorText,
  2. bool checkNullOrEmpty = true,
})

FormFieldValidator that requires the field's value to be a valid date string.

Parameters:

  • errorText The error message when the date is invalid.
  • checkNullOrEmpty Whether to check for null or empty values.

Implementation

static FormFieldValidator<String> date({
  String? errorText,
  bool checkNullOrEmpty = true,
}) => DateValidator(
  errorText: errorText,
  checkNullOrEmpty: checkNullOrEmpty,
).validate;