PouryaKit.Validation
0.1.0-preview.2
dotnet add package PouryaKit.Validation --version 0.1.0-preview.2
NuGet\Install-Package PouryaKit.Validation -Version 0.1.0-preview.2
<PackageReference Include="PouryaKit.Validation" Version="0.1.0-preview.2" />
<PackageVersion Include="PouryaKit.Validation" Version="0.1.0-preview.2" />
<PackageReference Include="PouryaKit.Validation" />
paket add PouryaKit.Validation --version 0.1.0-preview.2
#r "nuget: PouryaKit.Validation, 0.1.0-preview.2"
#:package PouryaKit.Validation@0.1.0-preview.2
#addin nuget:?package=PouryaKit.Validation&version=0.1.0-preview.2&prerelease
#tool nuget:?package=PouryaKit.Validation&version=0.1.0-preview.2&prerelease

PouryaKit.Validation
FluentValidation validators for commands and queries, run as one step of the Kit's fixed pipeline. Each validator sits beside its Feature, and every failure of every validator comes back as one failed Result, its Errors naming the input they are about, before the handler runs.
Install
dotnet add package PouryaKit.Validation --prerelease
When to use it
- A command's or query's input needs checking before its handler runs.
- A paged query must refuse a size, sort or filter it did not declare.
It plugs into PouryaKit.Cqrs, whose pipeline runs it, and PouryaKit.Web answers its Errors in a problem response, each naming its input.
Quick start
Register the Module's validators in its Composition Root:
module.AddPouryaKitValidation();
Write one validator per command or query that needs input checks, beside it in the Feature, as the Proving Sample does:
internal sealed class CreateProductCommandValidator : AbstractValidator<CreateProductCommand>
{
public CreateProductCommandValidator()
{
RuleFor(command => command.ProductId).NotEmpty();
RuleFor(command => command.CategoryId).NotEmpty();
RuleFor(command => command.Name).NotEmpty().MaximumLength(200);
}
}
What you get
- One validation step, in its fixed place in the pipeline, so a handler sees only input that passed.
- Every failure at once, as Errors in the Result; nothing throws.
- Validators found in the Module's own assembly, internal ones included.
- Rules for a Page's size, sort and filter.
Validate the input's shape here. A business rule that depends on state belongs in the aggregate, where it returns an Error.
Learn more
| 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. |
-
net10.0
- FluentValidation (>= 12.2.0)
- PouryaKit.Cqrs (>= 0.1.0-preview.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on PouryaKit.Validation:
| Package | Downloads |
|---|---|
|
PouryaKit.Reporting.Module
The Kit's report Module: report jobs generated in the background, stored through the Host's file storage and served to their requester by a time-limited link. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-preview.2 | 76 | 11/1/2026 |
| 0.1.0-preview.1 | 80 | 10/31/2026 |
| 0.1.0-preview.0.28 | 72 | 10/26/2026 |