max<T> static method
FormFieldValidator that requires the field's value to be less than (or equal) to the provided number.
Parameters:
max
The maximum value to compare.inclusive
Whether the comparison is inclusive (default: true).errorText
The error message when the value is invalid.checkNullOrEmpty
Whether to check for null or empty values.
Implementation
static FormFieldValidator<T> max<T>(
num max, {
bool inclusive = true,
String? errorText,
bool checkNullOrEmpty = true,
}) => MaxValidator<T>(
max,
inclusive: inclusive,
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
).validate;