FluentValidation v9.2.2 Release Notes
Release Date: 2020-09-20 // over 4 years ago-
๐ Release notes
โฌ๏ธ Please read the upgrade guide if you are moving from 8.x to 9.x
๐ Changes in 9.2.1
- ๐ Fix one of the inheritance validator overloads not working correctly (#1528)
๐ Changes 9.2.1
- โ Add non-generic extensibility point to inheritance validator
- โก๏ธ Updates to Persian translations (#1513)
- โ Added Bengali translations (#1517)
๐ Changes in 9.2.0
- โ Add inheritance validator (#1237) - see https://docs.fluentvalidation.net/en/latest/inheritance.html
- ๐ Various performance improvements
๐ Changes in 9.1.3
- ๐ Fix an issue with IncludeRulesNotInRuleSet not working correctly (#1493)
๐ Changes in 9.1.2
- ๐ Make the ValidationContext.ThrowOnFailures getter public.
๐ Changes in 9.1.1
- โก๏ธ Update incorrect wording in
CascadeMode.StopOnFirstFailure
deprecation warning.
๐ Changes in 9.1.0
- โ Add new Validate extension methods that allow options to be configured using a strategy (#1467)
- ๐ Introduce CascadeMode.Stop and deprecate CascadeMode.StopOnFirstFailure to resolve confusion/abiguity about setting the cascade mode at validator-level (#1437)
- ๐ป RaiseValidationException can be overridden to customize the exception throwing process (#1162)
- ๐ Make ruleset separator character splitting consistent (#1424)
- โ Transform now works with RuleForEach (#1450)
- Introduce constants for rulesets (#1435)
- ๐ Resolve issue when attempting to use asynchronous conditions in a synchornous validaiton run (#1438)
- โ Added asynchronous versions of the TestHelper methods (#1423)
Example of using the new validation strategy:
// Validate specific rulesetsvalidator.Validate(instance, opt =\> { opt.IncludeRuleSets("MyRuleSet", "SomeOtherRuleSet"); // Can also force rules not in a ruleset to be runopt.IncludeRulesNotInRuleSet(); });// Validate specific propertiesvalidator.Validate(instance, opt =\> { opt.IncludeProperties("Forename", "Surname"); // oropt.IncludeProperties(x =\> x.Surname, x.Forename); });// Throw exceptions on failurevalidator.Validate(instance, opt =\> { opt.ThrowOnFailures(); });// Combine various optionsvalidator.Validate(instance, opt =\> { opt.IncludeRuleSets("MyRuleSet", "SomeOtherRuleSet").IncludeRulesNotInRuleSet(); opt.ThrowOnFailures(); });
Downloads
Binaries can be downloaded from nuget:
- ๐ฆ FluentValidation - Main package
- ๐ฆ FluentValidation.AspNetCore - ASP.NET Core integration