CleanArchitecture.Extensions.Validation
0.1.6
dotnet add package CleanArchitecture.Extensions.Validation --version 0.1.6
NuGet\Install-Package CleanArchitecture.Extensions.Validation -Version 0.1.6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CleanArchitecture.Extensions.Validation" Version="0.1.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CleanArchitecture.Extensions.Validation" Version="0.1.6" />
<PackageReference Include="CleanArchitecture.Extensions.Validation" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CleanArchitecture.Extensions.Validation --version 0.1.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CleanArchitecture.Extensions.Validation, 0.1.6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CleanArchitecture.Extensions.Validation@0.1.6
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CleanArchitecture.Extensions.Validation&version=0.1.6
#tool nuget:?package=CleanArchitecture.Extensions.Validation&version=0.1.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CleanArchitecture.Extensions.Validation
FluentValidation-powered MediatR pipeline aligned with CleanArchitecture.Extensions.Core results.
- Executes validators in the MediatR pipeline and surfaces failures as exceptions or
Resultresponses. - Optional notification publishing through
IValidationNotificationPublisherfor UI or logging hooks. - Correlation-aware summaries: plugs into
ILogContext/IAppLoggerand usesSeverityLogLevelsto choose log levels per failure. - Tunable options for fail-fast limits, message formatting, notify/return/throw strategies, and trace ID propagation from Core.
- Ships with SourceLink, XML docs, and snupkg symbols for debugger-friendly packages.
Install
dotnet add package CleanArchitecture.Extensions.Validation --version 0.1.1-preview.1
Usage
using CleanArchitecture.Extensions.Validation.Behaviors;
using CleanArchitecture.Extensions.Validation.Options;
using CleanArchitecture.Extensions.Core.Logging;
using FluentValidation;
using MediatR;
// Configure validation options once
services.AddCleanArchitectureValidation(options =>
{
options.Strategy = ValidationStrategy.ReturnResult;
options.IncludePropertyName = true;
options.SeverityLogLevels[Severity.Error] = LogLevel.Warning;
options.LogValidationFailures = true;
});
// Register validators and the pipeline behavior
services.AddValidatorsFromAssemblyContaining<CreateOrderValidator>();
services.AddMediatR(cfg =>
{
cfg.RegisterServicesFromAssemblyContaining<CreateOrderValidator>();
cfg.AddCleanArchitectureValidationPipeline();
});
Implement IValidationNotificationPublisher if you want to capture validation failures without throwing.
Rule helpers
NotEmptyTrimmedEmailAddressBasicOptionalEmailAddressPositiveIdPageNumberPageSizePhoneE164UrlAbsoluteHttpHttpsCultureCodeSortExpression(allowed field whitelist)- Tenant-aware rules (planned alongside the Multitenancy module)
Target frameworks
- net10.0
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- CleanArchitecture.Extensions.Core (>= 0.1.6)
- FluentValidation (>= 12.1.1)
- MediatR (>= 14.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 0.1.6 | 454 | 12/10/2025 | |
| 0.1.6-preview.13 | 396 | 12/10/2025 | |
| 0.1.5 | 459 | 12/9/2025 | |
| 0.1.4 | 466 | 12/9/2025 | |
| 0.1.3-preview.1 | 381 | 12/8/2025 | |
| 0.1.2 | 446 | 12/8/2025 | |
| 0.1.1-preview.1 | 181 | 12/7/2025 | |
| 0.1.0-preview.1 | 158 | 12/5/2025 |