Bondarukini.Validation.DependencyInjection 10.0.0

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

Bondarukini.Validator.DependencyInjection

Dependency injection extensions for Bondarukini.Validator.
Provides simple, automatic registration of all validators across your assemblies.


✨ Features

  • One-line registration for all validators
  • Automatically scans assemblies for:
    • IValidator<T> implementations
  • Seamless integration with Bondarukini.Mediator pipeline
  • Works perfectly with ValidatorBehaviour<TRequest, TResponse>

πŸš€ Installation

dotnet add package Bondarukini.Validator.DependencyInjection

πŸ’‘ Example Usage

In your Program.cs or Startup.cs:

using Microsoft.Extensions.DependencyInjection;
using System.Reflection;
using Bondarukini.Validator.DependencyInjection;

var builder = WebApplication.CreateBuilder(args);
var services = builder.Services;

// Register all validators from the current assembly
services.AddValidatorsFromAssembly(Assembly.GetExecutingAssembly());

// Or from multiple assemblies
services.AddValidatorsFromAssemblies(new[]
{
    Assembly.GetExecutingAssembly(),
    typeof(SomeSharedValidator).Assembly
});

Now all validators implementing IValidator<T> will be automatically discovered and available via DI.


🧱 Integration with Mediator

When using Bondarukini.Mediator, validators will automatically execute before the corresponding handlers
through the ValidatorBehaviour<TRequest, TResponse> pipeline step.

Example registration:

services.AddTransient(typeof(IPipelineBehavior<,>), typeof(ValidatorBehaviour<,>));

Package Description
Bondarukini.Validator Core validation engine
Bondarukini.Mediator Lightweight mediator implementation
Bondarukini.Mediator.Behaviors Validation & Transaction behaviors

πŸ§‘β€πŸ’» Author

Yurii Bondaruk
Clean, extensible, and minimalistic architecture tools for .NET πŸ‡ΊπŸ‡¦

Product 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.

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
10.0.0 136 3/11/2026
9.0.0 117 3/11/2026
8.1.0 359 10/6/2025