fileSizeInMegabytes static method

ValidationRule<File?> fileSizeInMegabytes(
  1. int maxSizeInMegabytes, {
  2. String? message,
})

Creates a FileSizeRule validation rule with the size in megabytes.

This rule validates that the input file size is within a specified limit. It can include a custom validation message.

Implementation

static ValidationRule<File?> fileSizeInMegabytes(int maxSizeInMegabytes,
        {String? message}) =>
    FileSizeRule.megabyte(
        maxSizeInMegabytes: maxSizeInMegabytes, message: message);