equal<T> static method

FormFieldValidator<T> equal<T>(
  1. Object value, {
  2. String? errorText,
  3. bool checkNullOrEmpty = true,
})

FormFieldValidator that requires the field's value be equal to the provided value.

Parameters:

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

Implementation

static FormFieldValidator<T> equal<T>(
  Object value, {
  String? errorText,
  bool checkNullOrEmpty = true,
}) => EqualValidator<T>(
  value,
  errorText: errorText,
  checkNullOrEmpty: checkNullOrEmpty,
).validate;