Trellis.FluentValidation
3.0.0-alpha.337
See the version list below for details.
dotnet add package Trellis.FluentValidation --version 3.0.0-alpha.337
NuGet\Install-Package Trellis.FluentValidation -Version 3.0.0-alpha.337
<PackageReference Include="Trellis.FluentValidation" Version="3.0.0-alpha.337" />
<PackageVersion Include="Trellis.FluentValidation" Version="3.0.0-alpha.337" />
<PackageReference Include="Trellis.FluentValidation" />
paket add Trellis.FluentValidation --version 3.0.0-alpha.337
#r "nuget: Trellis.FluentValidation, 3.0.0-alpha.337"
#:package Trellis.FluentValidation@3.0.0-alpha.337
#addin nuget:?package=Trellis.FluentValidation&version=3.0.0-alpha.337&prerelease
#tool nuget:?package=Trellis.FluentValidation&version=3.0.0-alpha.337&prerelease
Trellis.FluentValidation
A small bridge that turns FluentValidation output into Trellis results.
Installation
dotnet add package Trellis.FluentValidation
Quick Example
using FluentValidation;
using Trellis.FluentValidation;
public sealed record CreateUserRequest(string Email);
var validator = new InlineValidator<CreateUserRequest>();
validator.RuleFor(x => x.Email).NotEmpty().EmailAddress();
var result = validator.ValidateToResult(new CreateUserRequest("ada@example.com"));
Mediator Integration
Plug FluentValidation into the Trellis.Mediator validation stage so it composes with IValidate and aggregates all failures into one response:
builder.Services.AddMediator(opts => opts.ServiceLifetime = ServiceLifetime.Scoped);
builder.Services.AddTrellisBehaviors();
builder.Services.AddTrellisFluentValidation();
builder.Services.AddScoped<IValidator<MyCommand>, MyCommandValidator>();
The adapter normalizes FluentValidation property names (Metadata.Reference, Lines[0].Memo) into RFC 6901 JSON Pointers (/Metadata/Reference, /Lines/0/Memo).
Key Features
- Convert
ValidationResultintoResult<T>with Trellis validation errors. - Validate inline or through reusable validator classes.
- Plug into the
Trellis.Mediatorpipeline viaAddTrellisFluentValidation()(AOT-friendly open-generic registration; assembly-scanning overload available for non-AOT scenarios). - JSON Pointer normalization for nested and indexer property paths.
- Keep third-party validation libraries inside the same Result pipeline as the rest of your app.
Documentation
Part of Trellis
This package is part of the Trellis framework.
| 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.1.1)
- Microsoft.Extensions.DependencyInjection (>= 10.0.7)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.7)
- Trellis.Core (>= 3.0.0-alpha.337)
- Trellis.Mediator (>= 3.0.0-alpha.337)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Trellis.FluentValidation:
| Package | Downloads |
|---|---|
|
Trellis.Mediator.FluentValidation
Mediator pipeline adapter that plugs FluentValidation validators into the Trellis Mediator validation stage. Open-generic IMessageValidator<TMessage> that resolves every IValidator<TMessage> registered in DI and aggregates failures into a single Error.InvalidInput response. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0-alpha.425 | 0 | 6/27/2026 |
| 3.0.0-alpha.419 | 45 | 6/24/2026 |
| 3.0.0-alpha.418 | 107 | 6/23/2026 |
| 3.0.0-alpha.417 | 56 | 6/23/2026 |
| 3.0.0-alpha.397 | 73 | 6/18/2026 |
| 3.0.0-alpha.396 | 61 | 6/18/2026 |
| 3.0.0-alpha.394 | 74 | 6/18/2026 |
| 3.0.0-alpha.385 | 67 | 6/15/2026 |
| 3.0.0-alpha.382 | 64 | 6/12/2026 |
| 3.0.0-alpha.372 | 61 | 6/10/2026 |
| 3.0.0-alpha.360 | 80 | 6/7/2026 |
| 3.0.0-alpha.342 | 97 | 6/5/2026 |
| 3.0.0-alpha.337 | 67 | 6/3/2026 |
| 3.0.0-alpha.336 | 57 | 6/3/2026 |
| 3.0.0-alpha.304 | 74 | 5/29/2026 |
| 3.0.0-alpha.158 | 85 | 4/5/2026 |
| 3.0.0-alpha.157 | 73 | 4/4/2026 |
| 3.0.0-alpha.140 | 71 | 3/30/2026 |
| 3.0.0-alpha.137 | 69 | 3/27/2026 |
| 3.0.0-alpha.135 | 62 | 3/26/2026 |