match static method

FormFieldValidator<String> match(
  1. String? other(), [
  2. String message = 'Values do not match'
])

Fails when the value doesn't equal the value returned by other (e.g. a password-confirmation field).

Implementation

static FormFieldValidator<String> match(
  String? Function() other, [
  String message = 'Values do not match',
]) =>
    (value) => value == other() ? null : message;