NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
NuGet, #57 most downloaded on NuGet
A validation library for .NET that uses a fluent interface to construct strongly-typed validation rules.
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
15 versions withdrawn
withdrawn after publishing
127 years old
192 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 →
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:
Add non-generic Add method to inheritance validator. Updates to Persian translations (#1513) Added Bengali translations (#1517)
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:
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 issue with WebApi integration where DataAnnotations validation could generate duplicate messages when used in the same project as FluentValidation
Fix typo in the FluentValidation.DependencyInjectionExtensions package name.
Fix typo in FluentValidation.DependencyInjectionExtensions package name.
Resolved issue using InjectValidator with RuleForEach.
InjectValidator with RuleForEach.IValidatorInterceptor to be registered with the ASP.NET Core Service Provider.Without... test extensions for consistency with existing With... text extensions.Add extensions for injecting child validators using the ASP.NET Core Service Provider. WithLocalizedMessage is deprecated. Use the overload of WithMes…
Add extensions for injecting child validators using the ASP.NET Core Service Provider. WithLocalizedMessage is deprecated. Use the overload of WithMessage that takes a Func instead. Implement RuleFor(...).ForEach(...) as an alternative to RuleForEach
Resolved issue where clientside validation was incorrectly generating metadata for rules with shared conditions.
ScalePrecisionValidator now has a public method in the fluent interface.ScalePrecisionValidator for consistency.Fix issue with shared condition cache incorrectly caching when used with RuleForEach
RuleForEachWhen/Unless conditions didn't execute correctly when used with RuleForEach.Fix the same issue from 8.1.1 but for async conditions. Fix issue where shared When/Unless conditions didn't execute correctly when used with RuleForEach.
Added RuleSetsExecuted property to ValidationResult.
RuleSetsExecuted property to ValidationResult.RuleForEach.Added format support for message placeholders.
ShouldNotHaveValidationErrorFor test extension.When/WhenAsync/Unless/UnlessAsync are now only executed once (instead of once for each rule).Otherwise method chained from root-level When/WhenAsync/Unless/UnlessAsync.Skip property to MVC5's CustomizeValidatorAttribute to bring parity with AspNetCore and WebApi integration.OverridePropertyName overload that takes an expression.Nothing published for this version
Nothing published for this version
Fix clientside property comparison validation adaptor in ASP.NET Core integration.
Added Greek language translation.
Deprecate SetCollectionValidator in favour of RuleForEach().SetValidator
SetValidator for complex properties.PropertyValidatorOptions in order to clean up the IPropretyValidator interface.AttributedValidatorFactory into a separate package.IStringSource.GetString now takes a context.SetCollectionValidator in favour of RuleForEach().SetValidatorCustom/CustomAsync.RemoveRule/ReplaceRule/ClearRules methods.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
Added Albanian language translations Added Chinese Traditional language translation Fix #858 ValidationTestExtension.When() incorrectly checks each fa
Added Albanian language translations Added Chinese Traditional language translation Fix #858 ValidationTestExtension.When() incorrectly checks each failure instead of all failures
Added AbstractValidator.PreValidate to allow immediate cancellation of validation.
Added AbstractValidator.PreValidate to allow immediate cancellation of validation.
Using [BindProperty] in AspNetCore now works when implicit child validation is disabled. ShouldHaveChildValidator now works when the child validator i
Using [BindProperty] in AspNetCore now works when implicit child validation is disabled. ShouldHaveChildValidator now works when the child validator is inside a DependentRules block. Test helpers are now compatible with custom property name resolvers set using ValidatorOptions.PropertyNameResolver. Switched to embedded debug symbols.
Fixed a regression where calling ValidateAsync with RuleForEach would no longer execute tasks sequentially (#799).
Fixed a regression where calling ValidateAsync with RuleForEach would no longer execute tasks sequentially (#799).
Added support for RuleForEach to the testing extensions (#238). Fixed a regression where calling ValidateAsync with RuleForEach could cause a deadlock
Added support for RuleForEach to the testing extensions (#238). Fixed a regression where calling ValidateAsync with RuleForEach could cause a deadlock (#799). Added ToString overrides on ValidationResult to generate a string representation of all errors (#778). Updated logos thanks to Dylan Beattie (#780).
Resolved an issue where ValidateAsync was called on child validators when the root validator was invoked synchronously.
Resolved an issue where ValidateAsync was called on child validators when the root validator was invoked synchronously.
Fix WhenAsync not working properly when calling Validate instead of ValidateAsync Upgrade ASP.NET Core integration to ASP.NET Core 2.1 Include rules n
Fix WhenAsync not working properly when calling Validate instead of ValidateAsync Upgrade ASP.NET Core integration to ASP.NET Core 2.1 Include rules now work with explicitly-selected properties. Added caching when instantiating validators to obtain clientside metadata
Nothing published for this version
Support multiple rulesets on a rule. Make setters on ValidationFailure's properties public to allow for easier deserialization. Additional overload fo
Support multiple rulesets on a rule. Make setters on ValidationFailure's properties public to allow for easier deserialization. Additional overload for OverridePropertyName that takes an expression. Add overload of Include that lazily creates the inner validator. Allow replacing the default Error Code resolution process
Support CustomizeValidatorAttribute in WebApi integration Resolved issues with referencing FluentValidation from legacy PCLs.
Support CustomizeValidatorAttribute in WebApi integration Resolved issues with referencing FluentValidation from legacy PCLs.
Better handling of clientside messages when using custom overridden language resources Flag in the ValidationContext's RootDataContext when a validato
Better handling of clientside messages when using custom overridden language resources Flag in the ValidationContext's RootDataContext when a validator is invoked by the automatic MVC/WebApi integration Improvements to some of the validation tester's messages Added Transform method to transform property values prior to validation Improve support for DisplayAttribute / DisplayNameAttribute when inferring property display name Added Slovak language support Added Hebrew language support Added Brazilian Portuguese language support Cache display names by default Ensure ShouldHaveChildValidator test method works with model-level rules Removed netstandard1.0 support. Supported platforms are now netstandard1.1, netstandard2.0 and net45.
Update DependentRules syntax and mark old syntax as obsolete Add workaround for inconsistent behaviour with HttpContext.Items with nonexistent keys in
Update DependentRules syntax and mark old syntax as obsolete Add workaround for inconsistent behaviour with HttpContext.Items with nonexistent keys in different version of AspNetCore Updated ValidationException serialization support Add ComparisonProperty to comparison validator message placeholders The Test Helper now correctly handles read-only properties Add CancellationToken support to ValidateAndThrowAsync and various ValidateAsync overloads Introduce MessageBuilderContext to make custom MessageBuilders more useful Update Microsoft.AspNetCore.Mvc dependency to 2.0.2 Update MVC5/WebApi2 AddToModelState extension not to overwrite existing attempted values Add SetRulesetForClientsideMessages extension method for MVC5/AspNetCore
One column per quarter.