Waystone.Monads.FluentValidation
7.3.0
dotnet add package Waystone.Monads.FluentValidation --version 7.3.0
NuGet\Install-Package Waystone.Monads.FluentValidation -Version 7.3.0
<PackageReference Include="Waystone.Monads.FluentValidation" Version="7.3.0" />
<PackageVersion Include="Waystone.Monads.FluentValidation" Version="7.3.0" />
<PackageReference Include="Waystone.Monads.FluentValidation" />
paket add Waystone.Monads.FluentValidation --version 7.3.0
#r "nuget: Waystone.Monads.FluentValidation, 7.3.0"
#:package Waystone.Monads.FluentValidation@7.3.0
#addin nuget:?package=Waystone.Monads.FluentValidation&version=7.3.0
#tool nuget:?package=Waystone.Monads.FluentValidation&version=7.3.0
Waystone.Monads.FluentValidation
An interop package for using FluentValidation with Waystone.Monads
Namespaces
The package shadows FluentValidation's own namespaces, so its types sit where a
consumer already looks for them rather than under a parallel Waystone tree:
| Member | Namespace |
|---|---|
ValidationError |
FluentValidation |
Validate, ValidateAsync |
FluentValidation.Extensions |
UseValidationErrorCode |
FluentValidation.Configs |
Before v7.0.0 these lived under Waystone.Monads.FluentValidation.*. Only the
using directives change; every type and member name is the same. There is no
compatibility shim, because a forwarding type in the old namespace would be a
different type at run time and a value is ValidationError pattern would
silently stop matching.
Supported FluentValidation versions
FluentValidation >= 11.1.0 && < 13.0.0. Bring your own version inside that
range; the package does not pin you to one.
The floor is 11.1.0 because that is the first release where
ValidationResult.ToDictionary() is an instance method — before it, the same
call was an extension method, so a build compiled against 11.1.0 or later fails
at run time against an older assembly.
FluentValidation 12 targets net8.0 only, so a consumer on .NET Framework or
netstandard2.0 cannot resolve it. That is FluentValidation's constraint, not
this package's.
Configuration
This package's options are configured through MonadOptions, so they are set
alongside the core options and respect MonadOptions.BeginScope:
MonadOptions.Configure(options => options.UseValidationErrorCode("validation.failed"));
// or scoped to a region of code
using (MonadOptions.BeginScope(options => options.UseValidationErrorCode("debug.validation")))
{
Result<TestClass, Error> result = value.Validate(new TestClassValidator());
// the err's code is "debug.validation"
}
The code is read when the validation runs, not when the error is later read.
ValidationError
The Error a validator's failures produce. It derives from Error, so a
validation step composes with every other step in a Result chain — there is no
conversion at the seam.
Failures carries the ValidationFailure list FluentValidation reported, and is
never empty. ToDictionary() groups the messages by property name, ready for a
problem-details payload.
if (error is ValidationError validationError)
{
return ValidationProblem(validationError.ToDictionary());
}
Validate
An extension method that can be invoked on any value (T). Accepts an
IValidator<T> which will be executed synchronously.
Example
TestClass value = new();
Result<TestClass, Error> result = value.Validate(new TestClassValidator());
if (result.IsErr)
{
// validation error
}
ValidateAsync
An extension method that can be invoked on any value (T). Accepts an
IValidator<T> which will be executed asynchronously. Returns a ValueTask, so
the call composes as a step in an async Result chain.
Example
TestClass value = new();
Result<TestClass, Error> result = await value.ValidateAsync(new TestClassValidator(), CancellationToken.None);
if (result.IsErr)
{
// validation error
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- FluentValidation (>= 11.1.0 && < 13.0.0)
- Waystone.Monads (>= 7.3.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 |
|---|---|---|
| 7.3.0 | 40 | 9/13/2026 |
| 7.2.0 | 82 | 9/9/2026 |
| 7.1.0 | 87 | 9/4/2026 |
| 7.1.0-beta.2 | 52 | 9/3/2026 |
| 7.1.0-beta.1 | 64 | 9/2/2026 |
| 7.0.1 | 91 | 8/30/2026 |
| 7.0.0 | 91 | 8/30/2026 |
| 7.0.0-beta.3 | 55 | 8/29/2026 |
| 7.0.0-beta.2 | 56 | 8/27/2026 |
| 7.0.0-beta.1 | 67 | 8/27/2026 |
| 6.7.0 | 94 | 8/26/2026 |
| 6.6.0 | 96 | 8/25/2026 |
| 6.5.0 | 96 | 8/25/2026 |
| 6.4.0 | 94 | 8/25/2026 |
| 6.3.0 | 99 | 8/25/2026 |
| 6.2.1 | 96 | 8/23/2026 |
| 6.2.0 | 105 | 8/22/2026 |
| 6.1.0 | 96 | 8/22/2026 |
| 6.0.0 | 104 | 8/20/2026 |
| 5.5.0 | 95 | 8/19/2026 |