match static method

FormFieldValidator<String> match({
  1. required String otherValue,
  2. required String mismatchMessage,
})

Must equal otherValue, e.g. "repeat password". UValidators.match(otherValue: passwordController.text, mismatchMessage: "Not the same")

Implementation

static FormFieldValidator<String> match({required String otherValue, required String mismatchMessage}) => (String? value) {
  if (value != otherValue) return mismatchMessage;
  return null;
};