FluentAnnotationsValidator.Runtime
2.0.0-rc.1.0.0
dotnet add package FluentAnnotationsValidator.Runtime --version 2.0.0-rc.1.0.0
NuGet\Install-Package FluentAnnotationsValidator.Runtime -Version 2.0.0-rc.1.0.0
<PackageReference Include="FluentAnnotationsValidator.Runtime" Version="2.0.0-rc.1.0.0" />
<PackageVersion Include="FluentAnnotationsValidator.Runtime" Version="2.0.0-rc.1.0.0" />
<PackageReference Include="FluentAnnotationsValidator.Runtime" />
paket add FluentAnnotationsValidator.Runtime --version 2.0.0-rc.1.0.0
#r "nuget: FluentAnnotationsValidator.Runtime, 2.0.0-rc.1.0.0"
#:package FluentAnnotationsValidator.Runtime@2.0.0-rc.1.0.0
#addin nuget:?package=FluentAnnotationsValidator.Runtime&version=2.0.0-rc.1.0.0&prerelease
#tool nuget:?package=FluentAnnotationsValidator.Runtime&version=2.0.0-rc.1.0.0&prerelease
FluentAnnotationsValidator.Runtime
FluentAnnotationsValidator.Runtime is the execution engine of the FluentAnnotationsValidator ecosystem. It powers dynamic validation pipelines by discovering attributes, composing rules, and executing validations at runtime. Designed for extensibility, localization, and seamless integration with dependency injection, this package is ideal for building culture-aware, fluent validation systems in .NET.
What It Does
Attribute Discovery
Parses[ValidationAttribute]and custom annotations likeMustAttribute,ComparisonAttribute, andCollectionValidationAttribute.Rule Composition
Builds validation rules dynamically using interfaces likeIValidationRuleBuilder,IValidationRuleGroup, andIFluentTypeValidator.Localization Support
Resolves localized error messages viaStringLocalizerFactoryResultandTypeUtils.Runtime Configuration
Configurable viaConfigurationOptions, with support for fluent overrides, async rules, and conditional logic.
Installation
dotnet add package FluentAnnotationsValidator.Runtime
Project Structure
Annotations
Custom runtime attributes for advanced validation scenarios:
MustAttribute– Inline predicate-based validationComparisonAttribute– Cross-property comparison with operatorsCollectionAttribute,CollectionAsyncAttribute– Collection-level rulesAsyncValidationAttribute– Asynchronous validation support
Extensions
Fluent APIs for rule composition and validator access:
FluentTypeValidatorExtensionsValidationRuleBuilderExtensions
Interfaces
Core abstractions for validators, rule groups, and configurators:
IFluentTypeValidator,IFluentTypeValidatorRootIValidationRuleBuilder,IValidationRuleGroup,IValidationRuleGroupRegistryIValidationConfigurator,IValidationTypeConfiguratorICollectionRule,IValidationRuleInternal
Core Components
FluentTypeValidator,FluentTypeValidatorRoot– Central runtime validatorsValidationRule,ValidationRule<T>– Rule definitionsValidationRuleBuilder– Fluent rule constructionValidationRuleGroup,ValidationRuleGroupList,ValidationRuleGroupRegistry– Rule grouping and registryPendingRule– Deferred rule resolutionRuleDefinitionBehavior– Controls rule discovery behaviorFluentValidationException– Exception for validation failuresTypeUtils– Reflection and localization helpersConfigurationOptions– DI and runtime configurationFluentAnnotationsBuilder– Entry point for configuring validation services
Getting Started
services.AddFluentAnnotationsValidators(options =>
{
options.ExtraValidatableTypesFactory = () => [typeof(MyModel)];
options.ConfigureLocalization = loc => loc.ResourcesPath = "Resources";
});
var validator = serviceProvider.GetRequiredService<IFluentValidator<MyModel>>();
var result = validator.Validate(new MyModel());
Advanced Features
- Conditional rule activation
- Async validation support
- Culture-aware error messages
- Fluent overrides for
[ValidationAttribute] - Extensible rule registry for custom scenarios
Related Packages
- FluentAnnotationsValidator.Annotations – Custom attributes
- FluentAnnotationsValidator.Core – Fluent rule builders
License
MIT
Contributing
We welcome contributions! Please see the contributor guide for details.
| Product | Versions 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 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. |
-
net8.0
- FluentAnnotationsValidator.Annotations (>= 2.0.0-rc.1.0.0)
- FluentAnnotationsValidator.Core (>= 2.0.0-rc.1.0.0)
- Microsoft.Extensions.DependencyInjection (>= 8.0.1)
- Microsoft.Extensions.Localization (>= 8.0.2)
- Microsoft.Extensions.Localization.Abstractions (>= 8.0.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on FluentAnnotationsValidator.Runtime:
| Package | Downloads |
|---|---|
|
FluentAnnotationsValidator
A fluent, culture-aware validation library for .NET. Automatically transforms [ValidationAttribute] annotations into runtime rules, with support for conditional logic, error localization, and developer-friendly configuration. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0-rc.1.0.0 | 80 | 10/4/2025 |