integer static method

FormFieldValidator<String> integer({
  1. int? radix,
  2. String? errorText,
  3. bool checkNullOrEmpty = true,
})

FormFieldValidator that requires the value to be a valid integer.

Parameters:

  • radix The radix to use when parsing the integer.
  • errorText The error message when the integer is invalid.
  • checkNullOrEmpty Whether to check for null or empty values.

Implementation

static FormFieldValidator<String> integer({
  int? radix,
  String? errorText,
  bool checkNullOrEmpty = true,
}) => IntegerValidator(
  radix: radix,
  errorText: errorText,
  checkNullOrEmpty: checkNullOrEmpty,
).validate;