Repository navigation
10.2.2
Release notes
Please read the upgrade guide if you are moving from 9.x to 10.x
Changes in 10.2.2
- Add backwards compatibility overloads for the changes in 10.2.1 (#1752)
Changes in 10.2.1
- Optional internal type registration should work with
AddFluentValidationas well as directly on the service collection (#1748)
Changes in 10.2.0
- Fix display name generation should be consistent between
RuleForEachandRuleFor.ForEach(#1231) - Allow
AddFluentValidationto be called directly onIServiceCollection(#1726) - Throw exception when calling
ValidateAndThroweven ifPreValidateprevents further validation (#1736) ValidationExceptionnow includes rule severity (#1733)- Optionally support internal types when scanning assemblies for validators (#1742)
- Deprecate
RunDefaultMvcValidationAfterFluentValidationExecutesin MVC configuration. UseDisableDataAnnotationsValidationinstead.
Changes in 10.1.0
- Allow default severity level to be set globally (#1715)
- Extend use of variance into the internal API to resolve invalid cast exceptions in some scenarios (#1711)
- Fix clientside metadata being incorrectly generated for cross-property LessThanOrEqual/GreaterThanOrEqual (#1721)
Changes in 10.0.4
- Resolved an issue where async conditions were run synchronously when applied to synchronous property validators
Changes in 10.0.3
- Fix ArgumentOutOfRangeException when condition returns false for RuleForEach containing multiple components (#1698)
Changes in 10.0.2
ErrorCodeis now exposed onIRuleComponent
Changes in 10.0.1
- Add
GetPropertyValuetoIValidationRuleto support #1688 - Context object is now strongly typed inside
IValidationRule<T>.ApplyCondition/ApplyAsyncConditionfor users of the internal API
Changes in 10.0.0
- Various performance improvements throughout the library
- Collection rules now only iterate the collection once
- Property validator classes are now generic
- Deprecated non-generic
PropertyValidator. - Changed type of
ValidationResult.ErrorsfromIList<ValidationFailure>toList<ValidationFailure> - The internal API now uses generics.
- Various property validator options have been seperated into
RuleComponents. - Various parts of the internal API are now internal (PropertyRule, CollectionPropertyRule etc).
ValidatorDescriptornow returns rule components in various places, wherePropertyValidatorswere previously returned- Default service lifetime in ASP.NET projects is now
Scopedrather thanTransient. - Combined
IActionContextValidatorInterceptorandIValidatorInterceptor. - Changes to the ASP.NET Client Validator Adaptor interfaces. These now receive the rule component.
- Removed deprecated
IStringSourceand its inheritors. - Removed deprecated
FormattedMessageArgumentsfromValidationFailure. - Removed other deprecated code.
Downloads
Binaries can be downloaded from nuget:
- FluentValidation - Main package
- FluentValidation.AspNetCore - ASP.NET Core integration