positiveNumber<T> static method

FormFieldValidator<T> positiveNumber<T>({
  1. String? errorText,
  2. bool checkNullOrEmpty = true,
})

FormFieldValidator that requires the field's value to be a positive number.

Parameters:

  • errorText The error message when the value is not positive.
  • checkNullOrEmpty Whether to check for null or empty values.

Implementation

static FormFieldValidator<T> positiveNumber<T>({
  String? errorText,
  bool checkNullOrEmpty = true,
}) => PositiveNumberValidator<T>(
  errorText: errorText,
  checkNullOrEmpty: checkNullOrEmpty,
).validate;