between<T> static method

FormFieldValidator<T> between<T>(
  1. num min,
  2. num max, {
  3. String? errorText,
  4. bool checkNullOrEmpty = true,
})

FormFieldValidator that requires the field's value to be between two numbers.

Parameters:

  • min The minimum value that the field's value should be greater than or equal to.
  • max The maximum value that the field's value should be less than or equal to.
  • 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> between<T>(
  num min,
  num max, {
  String? errorText,
  bool checkNullOrEmpty = true,
}) => BetweenValidator<T>(
  min,
  max,
  errorText: errorText,
  checkNullOrEmpty: checkNullOrEmpty,
).validate;