FluentValidation by Jeremy Skinner

<PackageReference Include="FluentValidation" Version="9.2.1" />

 IValidationRule

public interface IValidationRule
Defines a rule associated with a property which can have multiple validators.
string[] RuleSets { get; set; }

Name of the rule-set to which this rule belongs.

The validators that are grouped under this rule.

Applies an asynchronous condition to either all the validators in the rule, or the most recent validator in the rule chain.

void ApplyCondition(Func<PropertyValidatorContext, bool> predicate, ApplyConditionTo applyConditionTo = 0)

Applies a condition to either all the validators in the rule, or the most recent validator in the rule chain.

Applies an asynchronous condition that wraps the entire rule.

Applies a condition that wraps the entire rule.

Performs validation using a validation context and returns a collection of Validation Failures.

Performs validation using a validation context and returns a collection of Validation Failures asynchronously.