maxSize<E> static method
Validates that the file size is at most maxBytes.
FileRules.maxSize(5 * 1024 * 1024, error: 'Max 5MB')
Implementation
static Rule<FileInfo, E> maxSize<E>(int maxBytes, {required E error}) =>
PredicateRule(
predicate: (value) => value.size <= maxBytes,
error: error,
);