FluentValidation v9.3.0 Release Notes

Release Date: 2020-11-10 // 4 months ago
  • ๐Ÿš€ Release notes

    โฌ†๏ธ Please read the upgrade guide if you are moving from 8.x to 9.x

    ๐Ÿ”„ Changes in 9.3.0

    • ๐Ÿ‘Œ Support for .NET 5 and ASP.NET Core 5
    • ๐Ÿ‘Œ Improvements to LanguageManager's lazy loading of resources.
    • ๐Ÿ—„ Deprecate IStringSource and its implementors. Use delegates instead.
    • CustomizeValidatorAttribute now works in Razor pages (netcore 3.1 and net 5.0 only) (#1541)
    • RuleSetForClientSideMessagesAttribute now works in Razor pages (netcore 3.1 and net 5.0 only) (#1544)
    • ๐Ÿ›  Fixes to Spanish translations.

    ๐Ÿ”„ Changes in 9.2.2

    • ๐Ÿ›  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

    ๐Ÿ”„ 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:


Previous changes from v9.2.2

  • ๐Ÿš€ 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

    ๐Ÿ”„ 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: