NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
NuGet, #132 most downloaded on NuGet
Dependency injection extensions for FluentValidation
Latest stable
12.2.0
Last release 1 months ago
10 Oct 2026
Release timing varies
gaps range from 4 weeks to 10 months
Nearly every release is documented
notes for 59 of the last 60 stable releases
3 versions withdrawn
withdrawn after publishing
127 years old
89 releases · first in 1900
Drag across the ruler to compare, or tap a release to open it.
Nothing published for this version
Nothing published for this version
Update incorrect wording in CascadeMode.StopOnFirstFailure deprecation warning.
Please read the upgrade guide if you are moving from 8.x to 9.x
CascadeMode.StopOnFirstFailure deprecation warning.// Validate specific rulesets
validator.Validate(instance, opt => {
opt.IncludeRuleSets("MyRuleSet", "SomeOtherRuleSet");
// Can also force rules not in a ruleset to be run
opt.IncludeRulesNotInRuleSet();
});
// Validate specific properties
validator.Validate(instance, opt => {
opt.IncludeProperties("Forename", "Surname");
// or
opt.IncludeProperties(x => x.Surname, x.Forename);
});
// Throw exceptions on failure
validator.Validate(instance, opt => {
opt.ThrowOnFailures();
});
// Combine various options
validator.Validate(instance, opt => {
opt.IncludeRuleSets("MyRuleSet", "SomeOtherRuleSet").IncludeRulesNotInRuleSet();
opt.ThrowOnFailures();
});
Binaries can be downloaded from nuget:
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Nothing published for this version
Update incorrect wording in CascadeMode.StopOnFirstFailure deprecation warning.
Please read the upgrade guide if you are moving from 8.x to 9.x
CascadeMode.StopOnFirstFailure deprecation warning.// Validate specific rulesets
validator.Validate(instance, opt => {
opt.IncludeRuleSets("MyRuleSet", "SomeOtherRuleSet");
// Can also force rules not in a ruleset to be run
opt.IncludeRulesNotInRuleSet();
});
// Validate specific properties
validator.Validate(instance, opt => {
opt.IncludeProperties("Forename", "Surname");
// or
opt.IncludeProperties(x => x.Surname, x.Forename);
});
// Throw exceptions on failure
validator.Validate(instance, opt => {
opt.ThrowOnFailures();
});
// Combine various options
validator.Validate(instance, opt => {
opt.IncludeRuleSets("MyRuleSet", "SomeOtherRuleSet").IncludeRulesNotInRuleSet();
opt.ThrowOnFailures();
});
Binaries can be downloaded from nuget:
Update incorrect wording in CascadeMode.StopOnFirstFailure deprecation warning.
Please read the upgrade guide if you are moving from 8.x to 9.x
CascadeMode.StopOnFirstFailure deprecation warning.// Validate specific rulesets
validator.Validate(instance, opt => {
opt.IncludeRuleSets("MyRuleSet", "SomeOtherRuleSet");
// Can also force rules not in a ruleset to be run
opt.IncludeRulesNotInRuleSet();
});
// Validate specific properties
validator.Validate(instance, opt => {
opt.IncludeProperties("Forename", "Surname");
// or
opt.IncludeProperties(x => x.Surname, x.Forename);
});
// Throw exceptions on failure
validator.Validate(instance, opt => {
opt.ThrowOnFailures();
});
// Combine various options
validator.Validate(instance, opt => {
opt.IncludeRuleSets("MyRuleSet", "SomeOtherRuleSet").IncludeRulesNotInRuleSet();
opt.ThrowOnFailures();
});
Binaries can be downloaded from nuget:
Update incorrect wording in CascadeMode.StopOnFirstFailure deprecation warning.
Please read the upgrade guide if you are moving from 8.x to 9.x
CascadeMode.StopOnFirstFailure deprecation warning.// Validate specific rulesets
validator.Validate(instance, opt => {
opt.IncludeRuleSets("MyRuleSet", "SomeOtherRuleSet");
// Can also force rules not in a ruleset to be run
opt.IncludeRulesNotInRuleSet();
});
// Validate specific properties
validator.Validate(instance, opt => {
opt.IncludeProperties("Forename", "Surname");
// or
opt.IncludeProperties(x => x.Surname, x.Forename);
});
// Throw exceptions on failure
validator.Validate(instance, opt => {
opt.ThrowOnFailures();
});
// Combine various options
validator.Validate(instance, opt => {
opt.IncludeRuleSets("MyRuleSet", "SomeOtherRuleSet").IncludeRulesNotInRuleSet();
opt.ThrowOnFailures();
});
Binaries can be downloaded from nuget:
Introduce CascadeMode.Stop and deprecate CascadeMode.StopOnFirstFailure to resolve confusion/abiguity about setting the cascade mode at validator-leve…
Please read the upgrade guide if you are moving from 8.x to 9.x
// Validate specific rulesets
validator.Validate(instance, opt => {
opt.IncludeRuleSets("MyRuleSet", "SomeOtherRuleSet");
// Can also force rules not in a ruleset to be run
opt.IncludeRulesNotInRuleSet();
});
// Validate specific properties
validator.Validate(instance, opt => {
opt.IncludeProperties("Forename", "Surname");
// or
opt.IncludeProperties(x => x.Surname, x.Forename);
});
// Throw exceptions on failure
validator.Validate(instance, opt => {
opt.ThrowOnFailures();
});
// Combine various options
validator.Validate(instance, opt => {
opt.IncludeRuleSets("MyRuleSet", "SomeOtherRuleSet").IncludeRulesNotInRuleSet();
opt.ThrowOnFailures();
});
Binaries can be downloaded from nuget:
Fix assembly version was still 8.
Fix assembly version was still 8.
FluentValidation 9 is a major release and includes several breaking changes. Please read the upgrade guide for full details
FluentValidation 9 is a major release and includes several breaking changes. Please read the upgrade guide for full details
IValidator.Validate(object) overload to improve typesafety (use a context if you need to preserve this behaviour)ValidationContext class with IValidationContext interfaceChildValidatorAdaptor and IncludeRule now require a generic type parameter indicating the root type being validated{ComparisonProperty} placeholder now passes through the same logic as the {PropertyName} placeholder for consistency{CollectionIndex} placeholder can now be accessed in child validatorsValidationException constructor that allows customising the default message.ScalePrecisionValidator algorithm now more consistent with SQL server (#1356)When predicate overload that takes a ValidationContextSetValidator that receives property value in callbackPropertyRule.ApplySharedCondition is now publicScalePrecisionValidatorTransform can now be used to transform a property value to another type prior to validation occurringWithMessageArgument to test helper extensionsAbstractValidator.ValidateFluentValidation.Internal.ComparerTrackingCollection has been marked as internalEqual/NotEqual now perform ordinal comparisons on string properties by defaultBinaries can be downloaded from nuget:
Removed support for netstandard1.1, netstandard1.6 and net45 (net461 still supported) Removed support for unsupported .NET Core versions (2.2 and 3.0). LTS versions are supported (2.1 and 3.1) Default email validation mode now uses the same logic as ASP.NET Core. Previous regex behaviour is opt-in. TestHelper advanced mode now has more features (see https://docs.fluentvalidation.net/en/latest/testing.html#advanced-test-extensions) Equal/NotEqual now perform ordinal comparison when used with string properties Severity can now be set dynamically with a callback Removed WithLocalizedMessage (WithMessage that takes a callback is the replacement) Removed ResourceName from ValidationFailure Removed ResourceName and ResourceType from IStringSource. Removed SetCollectionValidator which was deprecated in 8.0 Removed DelegatingValidator which was deprecated in 8.x. Additional overload of OnAnyFailure that can receive a collection of validation failures Remove DisplayAttribute integration and reference to DataAnnotations. ComparisonProperty placeholder is now formatted like PropertyName Translations of default error messages into other languages are now lazily-loaded PropertyValidator.ShouldValidateAsync reanamed to ShouldValidateAsynchronously to remove confusion where the naming suggested this was an async method PropertyValidatorContext.Instance renamed to InstanceToValidate for consistency with ValidationContext. Removed various methods from MessageFormatter that were deprecated in 8.x Added Slovenian translations of default error messages. Added Icelandic translations of default error messages. Added WithMessageArgument to the test helpers. Transform can now be used to transform property values to other types. FluentValidationModelValidatorProvider and FluentValidationModelValidator are now public. Add additional overload of SetValidator that takes a Func that receives the current property value. Work around a bug in ASP.NET Core's integration testing components that can cause ConfigureServices to run multiple times. SourceLink integration. {CollectionIndex} placeholder can now be accessed in child validators. Additional ValidationException constructor that allows using both the default message and a custom one together. ScalePrecisionValidator algorithm now matches SQL Server. Additional overload of the When methods that contain the validation context. Automatically scanned types can be excluded when calling RegisterValidatorsFromAssemblyContaining in ASP.NET Core projects. New AutomaticValidationEnabled property for use in ASP.NET Core projects (defaults to true).
Please read the upgrade guide for full details: https://docs.fluentvalidation.net/en/latest/upgrading-to-9.html
Please read the upgrade guide for full details: https://docs.fluentvalidation.net/en/latest/upgrading-to-9.html
IValidator.Validate(object) overload to improve typesafety (use a context if you need to preserve this behaviour)ValidationContext class with IValidationContext interfaceChildValidatorAdaptor and IncludeRule now require a generic type parameter indicating the root type being validated{ComparisonProperty} placeholder now passes through the same logic as the {PropertyName} placeholder for consistencyBinaries can be downloaded from nuget:
Please read the upgrade guide for full details: https://docs.fluentvalidation.net/en/latest/upgrading-to-9.html
Please read the upgrade guide for full details: https://docs.fluentvalidation.net/en/latest/upgrading-to-9.html
{CollectionIndex} placeholder can now be accessed in child validatorsValidationException constructor that allows customising the default message.ScalePrecisionValidator algorithm now more consistent with SQL server (#1356)When predicate overload that takes a ValidationContextBinaries can be downloaded from nuget:
Please read the upgrade guide for full details: https://docs.fluentvalidation.net/en/latest/upgrading-to-9.html
Please read the upgrade guide for full details: https://docs.fluentvalidation.net/en/latest/upgrading-to-9.html
SetValidator that receives property value in callbackPropertyRule.ApplySharedCondition is now publicScalePrecisionValidatorBinaries can be downloaded from nuget:
Removed the deprecated FluentValidation.Internal.Comparer
Please read the upgrade guide for full details: https://docs.fluentvalidation.net/en/latest/upgrading-to-9.html
Transform can now be used to transform a property value to another type prior to validation occurringWithMessageArgument to test helper extensionsAbstractValidator.ValidateFluentValidation.Internal.ComparerTrackingCollection has been marked as internalBinaries can be downloaded from nuget:
Removed SetCollectionValidator which was deprecated in 8.0
Please read the upgrade guide for full details: https://docs.fluentvalidation.net/en/latest/upgrading-to-9.html
Equal/NotEqual now perform ordinal comparisons on string properties by defaultBinaries can be downloaded from nuget:
Nothing published for this version
Fix CollectionIndex placeholder not working with async workflow.
Fix CollectionIndex placeholder not working with async workflow.
Adds an explicit netcoreapp3.1 target for FluentValidation.AspNetCore.
Binaries can be downloaded from nuget:
FluentValidation.WebApi - Legacy ASP.NET Web Api 2 integration (deprecated)
Binaries can be downloaded from nuget:
FluentValidation.WebApi - Legacy ASP.NET Web Api 2 integration (deprecated)
WithMessage can be used for client-side validation, provided they don't attempt to access model properties from inside the delegate (eg when using IStringLocalizer).OnFailure didn't work properly when invoked on validators with conditions.Binaries can be downloaded from nuget:
FluentValidation.WebApi - Legacy ASP.NET Web Api 2 integration (deprecated)
RuleForEach.ValidatorDescriptor now has consistent handling of model-level rules.RuleForEach can now access collection index in error message with {CollectionIndex} placeholder.RuleForEach combined with When has more intuitive behaviour.Of these new features, the main one to note is the new ChildRules syntax. When defining a rule against a collection of complex types, rules for the child properties can be defined directly inline rather than having to use a child validator:
public class CustomerValidator : AbstractValidator<Customer> {
public CustomerValidator() {
RuleForEach(x => x.Orders).ChildRules(order => {
order.RuleFor(x => x.ProductName).NotNull();
order.RuleFor(x => x.Amount).GreaterThan(0);
});
}
}
Binaries can be downloaded from nuget:
Add ASP.NET Core-compatible version of the email address validator. Simplify the advanced testhelper syntax. Add support for ASP.NET Core 3. Add support for defining child rules inline. ValidatorDescriptor now has consistent handling of model-level rules. RuleForEach can now access collection index in error message with {CollectionIndex} placeholder. Welsh language translations of default error messages. Hungrian language translations of default error messages. Indonesian language translations of default error messages. Using RuleForEach combined with When is now more intuitive. Fixed order of rule execution when using async validation.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
FluentValidation.WebApi - Legacy ASP.NET Web Api 2 integration (deprecated)
Binaries can be downloaded from nuget:
DelegatingValidator is now marked as deprecated.
GetServiceProvider not working correctly when invoked against a CustomContext/MessageBuilderContext.LanguageStringSource works with error-code overrides.PropertyValidatorOptions.Empty (now removed).When/Unless are handled internally.DelegatingValidator is now marked as deprecated.WhenAsync wouldn't work correctly when wrapping a top-level call to When.Fix typo in the FluentValidation.DependencyInjectionExtensions package name.
Fix typo in FluentValidation.DependencyInjectionExtensions package name.
One column per quarter.