Skip to content

Releases: FluentValidation/FluentValidation

8.6.1

19 Feb 11:14
Compare
Choose a tag to compare

Release notes

  • Adds an explicit netcoreapp3.1 target for FluentValidation.AspNetCore.

Downloads

Binaries can be downloaded from nuget:

8.6.0

19 Feb 11:13
8424a13
Compare
Choose a tag to compare

Release notes

  • Added support for ASP.NET Core 3.1
  • Fixed issue with property indexers being incorrectly stripped out when using test extensions.
  • AddToModelState no longer includes a dot if PropertyName is null

Downloads

Binaries can be downloaded from nuget:

8.5.1

04 Nov 12:09
Compare
Choose a tag to compare

Release notes

  • Ensure lazily loaded calls to 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).
  • Fix issue where OnFailure didn't work properly when invoked on validators with conditions.

Downloads

Binaries can be downloaded from nuget:

8.5.0

24 Sep 11:23
Compare
Choose a tag to compare

Release notes

  • Add support for ASP.NET Core 3.
  • Add ASP.NET Core-compatible version of the email address validator.
  • Simplify the advanced test-helper syntax.
  • Add support for defining child rules inline when using RuleForEach.
  • 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 has more intuitive behaviour.
  • Fixed order of rule execution when using async validation.

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);
    });
  }
}

Downloads

Binaries can be downloaded from nuget:

8.4.0

24 Sep 10:44
Compare
Choose a tag to compare

Release notes

  • Added simplified version of several messages across all translations to aid with ASP.NET Clientside validation.
  • New enum validator for string properties.

Downloads

Binaries can be downloaded from nuget:

8.3.0

24 Sep 10:45
Compare
Choose a tag to compare

Release notes

  • Fix issue in ASP.NET Core integration with GetServiceProvider not working correctly when invoked against a CustomContext/MessageBuilderContext.
  • Improved how LanguageStringSource works with error-code overrides.
  • Fix thread-safety issue with use of PropertyValidatorOptions.Empty (now removed).
  • Improved how calls to When/Unless are handled internally.
  • DelegatingValidator is now marked as deprecated.
  • Improvements to Croatian language translations.
  • Improvements to Georgian language translations.
  • Resolved subtle bug where top-level WhenAsync wouldn't work correctly when wrapping a top-level call to When.

8.2.3

24 Sep 10:46
Compare
Choose a tag to compare

Release Notes

  • Fix issue with WebApi integration where DataAnnotations validation could generate duplicate messages when used in the same project as FluentValidation.

8.2.2

24 Sep 10:46
Compare
Choose a tag to compare

Release notes

  • Fix typo in the FluentValidation.DependencyInjectionExtensions package name.

8.2.1

24 Sep 10:47
Compare
Choose a tag to compare

Release notes

  • Resolved issue using InjectValidator with RuleForEach.
  • Add support for a default IValidatorInterceptor to be registered with the ASP.NET Core Service Provider.
  • Added Without... test extensions for consistency with existing With... text extensions.

8.1.3

24 Sep 10:52
Compare
Choose a tag to compare

Release notes

  • Resolved issue where clientside validation was incorrectly generating metadata for rules with shared conditions.
  • ScalePrecisionValidator now has a public method in the fluent interface.
  • Fix placeholder names in ScalePrecisionValidator for consistency.
  • Updates to Portuguese (Brazil) translations.