message method

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

The error message to be displayed if validation fails.

This message indicates that the file size must not exceed the specified limit.

Implementation

@override
String message(dynamic value, [List<String>? options]) {
  if (options != null && options.isNotEmpty) {
    return 'The file size must not exceed ${options[0]} bytes.';
  }
  return 'The file size must not exceed the limit.';
}