Releases: FluentValidation/FluentValidation
Releases · FluentValidation/FluentValidation
8.6.1
Release notes
- Adds an explicit netcoreapp3.1 target for FluentValidation.AspNetCore.
Downloads
Binaries can be downloaded from nuget:
- FluentValidation - Main package
- FluentValidation.AspNetCore - ASP.NET Core integration
8.6.0
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:
- FluentValidation - Main package
- FluentValidation.AspNetCore - ASP.NET Core integration
- FluentValidation.WebApi - Legacy ASP.NET Web Api 2 integration (deprecated)
- FluentValidation.Mvc5 - Legacy ASP.NET MVC 5 integration (deprecated)
8.5.1
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:
- FluentValidation - Main package
- FluentValidation.AspNetCore - ASP.NET Core integration
- FluentValidation.WebApi - Legacy ASP.NET Web Api 2 integration (deprecated)
- FluentValidation.Mvc5 - Legacy ASP.NET MVC 5 integration (deprecated)
8.5.0
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 withWhen
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:
- FluentValidation - Main package
- FluentValidation.AspNetCore - ASP.NET Core integration
- FluentValidation.WebApi - Legacy ASP.NET Web Api 2 integration (deprecated)
- FluentValidation.Mvc5 - Legacy ASP.NET MVC 5 integration (deprecated)
8.4.0
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:
- FluentValidation - Main package
- FluentValidation.AspNetCore - ASP.NET Core integration
- FluentValidation.WebApi - Legacy ASP.NET Web Api 2 integration (deprecated)
- FluentValidation.Mvc5 - Legacy ASP.NET MVC 5 integration (deprecated)
8.3.0
Release notes
- Fix issue in ASP.NET Core integration with
GetServiceProvider
not working correctly when invoked against aCustomContext
/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 toWhen
.
8.2.3
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
Release notes
- Fix typo in the FluentValidation.DependencyInjectionExtensions package name.
8.2.1
Release notes
- Resolved issue using
InjectValidator
withRuleForEach
. - Add support for a default
IValidatorInterceptor
to be registered with the ASP.NET Core Service Provider. - Added
Without...
test extensions for consistency with existingWith...
text extensions.
8.1.3
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.