MatchesProperty function
ValidationRule for matchesProperty validator.
Implementation
ValidationRule MatchesProperty(String property, {String? message}) =>
ValidationRule(
message: message,
constraints: [property],
validate: (value, arguments) => Future(() => matchesProperty(
arguments.property, arguments.constraints[0], arguments.values)),
defaultMessage: (arguments) {
String property1 = arguments.property;
String property2 = arguments.constraints[0];
return '"$property1" must match "$property2"';
});