MatchesProperty function

ValidationRule MatchesProperty(
  1. String property, {
  2. String? message,
})

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"';
        });