range<T> static method
FormFieldValidator that requires the field's value to be within a certain range.
Parameters:
minThe minimum value should be greater than or equal to.maxThe maximum value should be less than or equal to.inclusiveWhether the range is inclusive (default: true).errorTextThe error message when the value is not in the range.checkNullOrEmptyWhether 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;