AdaskoTheBeAsT.FluentValidation.MediatR 13.0.0

dotnet add package AdaskoTheBeAsT.FluentValidation.MediatR --version 13.0.0
                    
NuGet\Install-Package AdaskoTheBeAsT.FluentValidation.MediatR -Version 13.0.0
                    
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="AdaskoTheBeAsT.FluentValidation.MediatR" Version="13.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AdaskoTheBeAsT.FluentValidation.MediatR" Version="13.0.0" />
                    
Directory.Packages.props
<PackageReference Include="AdaskoTheBeAsT.FluentValidation.MediatR" />
                    
Project file
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 AdaskoTheBeAsT.FluentValidation.MediatR --version 13.0.0
                    
#r "nuget: AdaskoTheBeAsT.FluentValidation.MediatR, 13.0.0"
                    
#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 AdaskoTheBeAsT.FluentValidation.MediatR@13.0.0
                    
#: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=AdaskoTheBeAsT.FluentValidation.MediatR&version=13.0.0
                    
Install as a Cake Addin
#tool nuget:?package=AdaskoTheBeAsT.FluentValidation.MediatR&version=13.0.0
                    
Install as a Cake Tool

AdaskoTheBeAsT.FluentValidation.MediatR

FluentValidation behavior for MediatR

Badges

CodeFactor Build Status Azure DevOps tests Azure DevOps coverage Quality Gate Status Sonar Tests Sonar Test Count Sonar Test Execution Time Sonar Coverage Nuget

Usage

It can be used in combination with AdaskoTheBeAsT.FluentValidation.SimpleInjector AdaskoTheBeAsT.MediatR.SimpleInjector

Validators registered as single

There should be only one validator per target If there is multiple combined validators needed then prepare one which will gather all rules from other based on Fluent Validation Including Rules and mark all sub validators with attribute SkipValidatorRegistrationAttribute.

    container.AddFluentValidation(
        cfg =>
        {
            cfg.WithAssembliesToScan(assemblies);
            cfg.AsScoped();
            cfg.RegisterAsSingleValidator(); // can be skipped as it is default
        });

    container.AddMediatR(
        cfg =>
        {
            cfg.WithAssembliesToScan(assemblies);
            cfg.UsingBuiltinPipelineProcessorBehaviors(true);
            cfg.UsingPipelineProcessorBehaviors(typeof(FluentValidationPipelineBehavior<,>));
            cfg.UsingStreamPipelineBehaviors(typeof(FluentValidationStreamPipelineBehavior<,>));
        });

Validators registered as collection

    container.AddFluentValidation(
        cfg =>
        {
            cfg.WithAssembliesToScan(assemblies);
            cfg.AsScoped();
            cfg.RegisterAsValidatorCollection();
        });

    container.AddMediatR(
        cfg =>
        {
            cfg.WithAssembliesToScan(assemblies);
            cfg.UsingBuiltinPipelineProcessorBehaviors(true);
            cfg.UsingPipelineProcessorBehaviors(typeof(FluentValidationCollectionPipelineBehavior<,>));
            cfg.UsingStreamPipelineBehaviors(typeof(FluentValidationCollectionStreamPipelineBehavior<,>));
        });
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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 is compatible.  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 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.

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
13.0.0 393 11/12/2025
12.0.0 457 1/4/2025
11.2.0 409 8/18/2024
11.0.2 288 5/27/2024
11.0.1 364 1/27/2024
11.0.0 330 12/1/2023
10.2.0 353 7/16/2023
10.1.0 340 5/4/2023
10.0.0 419 2/17/2023
9.1.0 496 1/22/2023
9.0.0 575 11/13/2022
8.0.0 589 10/17/2022
7.2.1 639 9/25/2022
7.2.0 616 9/7/2022
7.1.0 646 7/5/2022
7.0.0 646 5/14/2022
6.0.0 538 1/11/2022
5.3.3 487 1/2/2022
5.3.2 582 10/30/2021
5.3.1 800 8/29/2021
Loading failed

- NET 10.0 support
     - MediatR 13.1.0
     - FluentValidation 12.1.0