fileName static method

FormFieldValidator<String> fileName({
  1. RegExp? regex,
  2. String? errorText,
  3. bool checkNullOrEmpty = true,
})

FormFieldValidator that requires the field's value to be a valid file name.

Parameters:

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

Implementation

static FormFieldValidator<String> fileName({
  RegExp? regex,
  String? errorText,
  bool checkNullOrEmpty = true,
}) => FileNameValidator(
  regex: regex,
  errorText: errorText,
  checkNullOrEmpty: checkNullOrEmpty,
).validate;