| 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 » ICatValidatorProcessor Interface
ICatValidatorProcessor.ValidateAsync<TModel>(TModel, bool, CancellationToken) Method
Validates a model.
System.Threading.Tasks.Task<Cat.Responses.Abstractions.ICatResponse> ValidateAsync<TModel>(TModel model, bool validatorRequired=true, System.Threading.CancellationToken ct=default(System.Threading.CancellationToken))
where TModel : class;
Type parameters
TModel
The type being validated.
Parameters
model TModel
The model to validate.
validatorRequired System.Boolean
When true, a missing validator throws. When false, the model counts as valid.
ct System.Threading.CancellationToken
Token to cancel the work.
Returns
System.Threading.Tasks.Task<ICatResponse>
An Ok response when the model is valid, or a BadRequest response with one error per failure.