Trellis.FluentValidation
3.0.0-alpha.721
dotnet add package Trellis.FluentValidation --version 3.0.0-alpha.721
NuGet\Install-Package Trellis.FluentValidation -Version 3.0.0-alpha.721
<PackageReference Include="Trellis.FluentValidation" Version="3.0.0-alpha.721" />
<PackageVersion Include="Trellis.FluentValidation" Version="3.0.0-alpha.721" />
<PackageReference Include="Trellis.FluentValidation" />
paket add Trellis.FluentValidation --version 3.0.0-alpha.721
#r "nuget: Trellis.FluentValidation, 3.0.0-alpha.721"
#:package Trellis.FluentValidation@3.0.0-alpha.721
#addin nuget:?package=Trellis.FluentValidation&version=3.0.0-alpha.721&prerelease
#tool nuget:?package=Trellis.FluentValidation&version=3.0.0-alpha.721&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
The Mediator wire-up moved to the dedicated Trellis.Mediator.FluentValidation package in v3 so consumers that only need the standalone helpers don't take a Mediator dependency. Install that package to plug FluentValidation into the Trellis.Mediator validation stage:
dotnet add package Trellis.Mediator.FluentValidation
using Trellis.Mediator;
using Trellis.Mediator.FluentValidation;
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) using JsonPointerNormalizer, which is now part of the public surface of Trellis.FluentValidation.
Key Features
- Convert
ValidationResultintoResult<T>with Trellis validation errors. - Validate inline or through reusable validator classes.
JsonPointerNormalizer.ToJsonPointer(...)projects FluentValidation property names into RFC 6901 JSON Pointers — public so third-party adapters can reuse the normalization rules.- Plug into the
Trellis.Mediatorpipeline via the companionTrellis.Mediator.FluentValidationpackage. - 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 | net11.0 is compatible. |
-
net11.0
- FluentValidation (>= 12.2.0)
- Microsoft.Extensions.DependencyInjection (>= 11.0.0)
- OpenTelemetry.Api (>= 1.20.1)
- Trellis.Core (>= 3.0.0-alpha.721)
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.721 | 49 | 11/15/2026 |
| 3.0.0-alpha.582 | 86 | 10/19/2026 |
| 3.0.0-alpha.574 | 247 | 10/14/2026 |
| 3.0.0-alpha.571 | 77 | 10/13/2026 |
| 3.0.0-alpha.557 | 115 | 10/8/2026 |
| 3.0.0-alpha.554 | 84 | 10/8/2026 |
| 3.0.0-alpha.553 | 72 | 10/7/2026 |
| 3.0.0-alpha.542 | 135 | 10/5/2026 |
| 3.0.0-alpha.539 | 86 | 10/4/2026 |
| 3.0.0-alpha.532 | 116 | 10/2/2026 |
| 3.0.0-alpha.527 | 97 | 10/1/2026 |
| 3.0.0-alpha.526 | 75 | 9/30/2026 |
| 3.0.0-alpha.524 | 78 | 9/27/2026 |
| 3.0.0-alpha.520 | 98 | 9/25/2026 |
| 3.0.0-alpha.516 | 244 | 9/22/2026 |
| 3.0.0-alpha.513 | 93 | 9/22/2026 |
| 3.0.0-alpha.505 | 207 | 9/13/2026 |
| 3.0.0-alpha.495 | 261 | 8/24/2026 |
| 3.0.0-alpha.458 | 207 | 8/19/2026 |
| 3.0.0-alpha.455 | 155 | 8/19/2026 |