range<T> static method
FormFieldValidator that requires the field's value to be within a certain range.
Parameters:
min
The minimum value should be greater than or equal to.max
The maximum value should be less than or equal to.inclusive
Whether the range is inclusive (default: true).errorText
The error message when the value is not in the range.checkNullOrEmpty
Whether to check for null or empty values.
Implementation
static FormFieldValidator<T> range<T>(
num min,
num max, {
bool inclusive = true,
String? errorText,
bool checkNullOrEmpty = true,
}) => RangeValidator<T>(
min,
max,
inclusive: inclusive,
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
).validate;