IValidationRule
Defines a rule associated with a property which can have multiple validators.
Name of the rule-set to which this rule belongs.
The validators that are grouped under this rule.
void ApplyAsyncCondition(Func<PropertyValidatorContext, CancellationToken, Task<bool>> predicate, ApplyConditionTo applyConditionTo = 0)
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.
Task<IEnumerable<ValidationFailure>> ValidateAsync(IValidationContext context, CancellationToken cancellation)
Performs validation using a validation context and returns a collection of Validation Failures asynchronously.