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 » ICatValidatorProcessor Interface

ICatValidatorProcessor.Validate<TModel>(TModel, bool) Method

Validates a model and blocks until it finishes. Prefer ValidateAsync<TModel>(TModel, bool, CancellationToken) when you can.

Cat.Responses.Abstractions.ICatResponse Validate<TModel>(TModel model, bool validatorRequired=true)
    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.

Returns

ICatResponse
An Ok response when the model is valid, or a BadRequest response with one error per failure.