Tenekon.FluentValidation.Extensions.AspNetCore.Components
1.0.6-alpha-g5c83fc27bb
Prefix Reserved
See the version list below for details.
dotnet add package Tenekon.FluentValidation.Extensions.AspNetCore.Components --version 1.0.6-alpha-g5c83fc27bb
NuGet\Install-Package Tenekon.FluentValidation.Extensions.AspNetCore.Components -Version 1.0.6-alpha-g5c83fc27bb
<PackageReference Include="Tenekon.FluentValidation.Extensions.AspNetCore.Components" Version="1.0.6-alpha-g5c83fc27bb" />
<PackageVersion Include="Tenekon.FluentValidation.Extensions.AspNetCore.Components" Version="1.0.6-alpha-g5c83fc27bb" />
<PackageReference Include="Tenekon.FluentValidation.Extensions.AspNetCore.Components" />
paket add Tenekon.FluentValidation.Extensions.AspNetCore.Components --version 1.0.6-alpha-g5c83fc27bb
#r "nuget: Tenekon.FluentValidation.Extensions.AspNetCore.Components, 1.0.6-alpha-g5c83fc27bb"
#:package Tenekon.FluentValidation.Extensions.AspNetCore.Components@1.0.6-alpha-g5c83fc27bb
#addin nuget:?package=Tenekon.FluentValidation.Extensions.AspNetCore.Components&version=1.0.6-alpha-g5c83fc27bb&prerelease
#tool nuget:?package=Tenekon.FluentValidation.Extensions.AspNetCore.Components&version=1.0.6-alpha-g5c83fc27bb&prerelease
Tenekon.FluentValidation.Extensions
🚧 This is a new project. You are very welcome to anticipate in this project, shaping the public API and submit ideas. Because this project is currently in alpha state, the public API may change drastically.
Table of Contents
Packages
Package | Description |
---|---|
Tenekon.FluentValidation.Extensions.AspNetCore.Components |
Core Blazor integration for FluentValidation |
Tenekon.FluentValidation.Extensions.AspNetCore.Components
An extension to integrate FluentValidation with ASP.NET Core Components (Blazor). This library enhances component-level validation in Blazor applications using FluentValidation.
📖 Looking for the Component Validator Cookbook that covers all scenarios? Click here.
Features
- ✅ Seamless integration with Blazor forms.
- 🔁 Component-level validator injection
- 🧩 Validator components are nestable
- 🚀 Optimized with FastExpressionCompiler
Installation
dotnet add package Tenekon.FluentValidation.Extensions.AspNetCore.Components
Usage
- Define your validator using
FluentValidation
:
public class MyModelValidator : AbstractValidator<MyModel>
{
public MyModelValidator()
{
RuleFor(x => x.Name).NotEmpty();
}
}
- Register the validator in your DI container:
builder.Services.AddValidatorsFromAssemblyContaining<MyModelValidator>();
- Use the component validator in your Blazor form:
<EditForm Model="@model" OnValidSubmit="@HandleValidSubmit">
<ComponentValidatorRootpath ValidatorType="typeof(MyModelValidator)" />
<InputText @bind-Value="model.Name" />
<ValidationMessage For="@(() => model.Name)" />
<button type="submit">Submit</button>
</EditForm>
Looking for more advanced scenarios? Read the Component Validator Cookbook.
Target Framework
.NET 9.0
Dependencies
FluentValidation
12.xMicrosoft.AspNetCore.Components.Forms
9.xFastExpressionCompiler
5.x
Development
git clone https://github.com/tenekon/Tenekon.FluentValidation.Extensions.git
cd Tenekon.FluentValidation.Extensions
dotnet build
License
MIT License - see LICENSE for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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 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. |
-
net9.0
- FastExpressionCompiler (>= 5.3.0)
- FluentValidation (>= 12.0.0)
- Microsoft.AspNetCore.Components.Forms (>= 9.0.6)
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 |
---|---|---|
1.0.42-alpha-gf27ed5ad86 | 115 | 7/28/2025 |
1.0.40-alpha-gac9cdc2716 | 108 | 7/27/2025 |
1.0.37-alpha-gce928b8c06 | 266 | 7/26/2025 |
1.0.31-alpha-g8de9e4a020 | 516 | 7/22/2025 |
1.0.17-alpha-g4ac8c36ae7 | 303 | 7/21/2025 |
1.0.14-alpha-gd8abd9ba75 | 48 | 7/19/2025 |
1.0.6-alpha-g5c83fc27bb | 76 | 6/27/2025 |
1.0.1-alpha-ge071d15233 | 117 | 6/26/2025 |