validate method

  1. @override
bool validate(
  1. dynamic value, [
  2. List<String>? options
])
override

Validates whether the given value is a file.

This method checks if the value is an instance of MultipartFile.

value - The value to be validated. options - Additional options for validation (not used in this rule).

Returns true if the value is a file, otherwise false.

Implementation

@override
bool validate(dynamic value, [List<String>? options]) {
  return value is MultipartFile;
}