match static method
Returns a validator that checks whether a field matches another field's value.
Implementation
static String? Function(String?) match(String valueToMatch,
[String? message]) {
return (value) {
if (value != valueToMatch) return message ?? 'Values do not match';
return null;
};
}