View on GitHub
Clean Architecture Toolkit for .NET
Clean Architecture Toolkit is a clean, modular architecture foundation for .NET applications.
It embraces SOLID principles and focuses on maintainability, testability, and scalability through clear boundaries and pluggable design.

|   HOME   |   MODULE OVERVIEW   |   DEMO   |   CAT.VALIDATORS   |

Code Reference

» Cat.Validators.Abstractions Assembly » Cat.Validators.Abstractions Namespace » ICatValidatorPropertyRuleBuilder<TModel,TProperty> Interface

ICatValidatorPropertyRuleBuilder<TModel,TProperty>.AddPropertyRule<TRule>(TRule) Method

Adds a rule for the property.

Cat.Validators.Abstractions.ICatValidatorPropertyRuleOptionsBuilder<TModel,TProperty> AddPropertyRule<TRule>(TRule rule)
    where TRule : class, Cat.Validators.Abstractions.ICatValidatorPropertyRule<TModel, TProperty>;

Type parameters

TRule

The type of the rule.

Parameters

rule TRule

The rule to add.

Returns

Cat.Validators.Abstractions.ICatValidatorPropertyRuleOptionsBuilder<TModel,TProperty>
A builder for the rule options, like a condition or a custom message.