float<T> static method

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

FormFieldValidator that requires the field's value to be a valid float.

Parameters:

  • errorText The error message when the float is invalid.
  • checkNullOrEmpty Whether to check for null or empty values.

Implementation

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