Keel.Endpoints.FluentValidation
1.0.0-preview.3
This is a prerelease version of Keel.Endpoints.FluentValidation.
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Keel.Endpoints.FluentValidation --version 1.0.0-preview.3
NuGet\Install-Package Keel.Endpoints.FluentValidation -Version 1.0.0-preview.3
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="Keel.Endpoints.FluentValidation" Version="1.0.0-preview.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Keel.Endpoints.FluentValidation" Version="1.0.0-preview.3" />
<PackageReference Include="Keel.Endpoints.FluentValidation" />
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 Keel.Endpoints.FluentValidation --version 1.0.0-preview.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Keel.Endpoints.FluentValidation, 1.0.0-preview.3"
#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 Keel.Endpoints.FluentValidation@1.0.0-preview.3
#: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=Keel.Endpoints.FluentValidation&version=1.0.0-preview.3&prerelease
#tool nuget:?package=Keel.Endpoints.FluentValidation&version=1.0.0-preview.3&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Keel.Endpoints.FluentValidation
FluentValidation for Keel.Endpoints and any ASP.NET Core
Minimal API. An ordinary endpoint filter runs the registered IValidator<T> for each argument before the
handler, and failures return 400 validation problem details: the same shape as .NET 10 validation.
dotnet add package Keel.Endpoints.FluentValidation --prerelease
builder.Services.AddKeelEndpoints();
builder.Services.AddProblemDetails();
builder.Services.AddKeelFluentValidation(typeof(Program).Assembly); // registers IValidator<T> types
app.MapKeelEndpoints("/api")
.RequireAuthorization()
.WithFluentValidation();
public sealed record CreateInvoice(string Customer, decimal Amount);
public sealed class CreateInvoiceValidator : AbstractValidator<CreateInvoice>
{
public CreateInvoiceValidator()
{
RuleFor(x => x.Customer).NotEmpty().MaximumLength(100);
RuleFor(x => x.Amount).GreaterThan(0);
}
}
- Opt-in per group or endpoint.
WithFluentValidation()works on a route group, on one endpoint (options.Convention(b => b.WithFluentValidation())) or on anyMapGet/MapPost. - Zero cost where unused. The filter is only attached to endpoints that have an argument with a registered validator.
- Async rules (
MustAsync,CustomAsync) run with the request's cancellation token. [FromBody]members of a contract bound as parameters are validated too; their error keys are prefixed with the member name (Body.Customer).- Bring your own registration. Validators registered with
FluentValidation.DependencyInjectionExtensionsor by hand are picked up the same way.
Choose one validation system per contract: if a contract has both DataAnnotations (with AddValidation())
and a FluentValidation validator, both run and both can reject the request.
| 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
- FluentValidation (>= 12.0.0)
- Keel.Endpoints (>= 1.0.0-preview.3)
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 |
|---|---|---|
| 1.0.0-rc.8 | 43 | 11/12/2026 |
| 1.0.0-rc.7 | 63 | 11/1/2026 |
| 1.0.0-rc.6 | 65 | 11/1/2026 |
| 1.0.0-rc.5 | 63 | 10/31/2026 |
| 1.0.0-rc.4 | 63 | 10/31/2026 |
| 1.0.0-rc.3 | 65 | 10/31/2026 |
| 1.0.0-rc.2 | 67 | 10/31/2026 |
| 1.0.0-rc.1 | 68 | 10/24/2026 |
| 1.0.0-preview.6 | 145 | 10/23/2026 |
| 1.0.0-preview.5 | 62 | 10/23/2026 |
| 1.0.0-preview.4 | 63 | 10/23/2026 |
| 1.0.0-preview.3 | 60 | 10/23/2026 |
| 1.0.0-preview.2 | 61 | 10/19/2026 |
| 1.0.0-preview.1 | 62 | 10/18/2026 |
| 0.4.0-preview.1 | 63 | 10/18/2026 |
| 0.3.0-preview.1 | 59 | 10/18/2026 |
| 0.2.0-preview.1 | 59 | 10/18/2026 |
| 0.1.0-preview.4 | 57 | 10/18/2026 |
| 0.1.0-preview.3 | 59 | 10/18/2026 |
| 0.1.0-preview.2 | 64 | 10/18/2026 |