Release notes
Please read the upgrade guide if you are moving from 9.x to 10.x
Changes in 10.4.0
- Allow use of "*" with
RuleSetForClientSideMessagesAttribute
andHttpContext.SetRulesetForClientsideMessages
(#1912) - Fix Azerbaijani language code (#1874)
Changes in 10.3.6
- Fix Azerbaijani language code (#1865)
- Setting
DisableAutomaticValidation
to true should prevent implicit validation running (#1868) - Enable package validation (#1860)
Changes in 10.3.5
- Fixed issue with
ValidateAndThrow
not working in some scenarios where context creation requires type conversion (#1863).
Changes in 10.3.4
- Clientside messages shouldn't be generated for the lazy version of LessThanOrEqual/GreaterThanOrEqual (#1818)
- Remove enumable boxing in Empty/NotEmpty validators (#1823)
Changes in 10.3.3
- Remove class constraint from
TestValidate
(#1815)
Changes in 10.3.1
- Fix
ScalePrecision
error message whendigits
is calculated as negative (#1790) - Shared conditions shouldn't rely on object hashcode for unique ID (#1810)
Changes in 10.3.0
- Update Russian, Thai, Azerbaijani error message translations (#1761, #1768, #1770)
- Deprecate the old test helper methods in favour of
TestValidate
. - Deprecate
OnFailure
andOnAnyFailure
callbacks.
Changes in 10.2.3
- Resolve issue with rulesets not cascading correctly to Inheritance Validators (#1754)
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
AddFluentValidation
as well as directly on the service collection (#1748)
Changes in 10.2.0
- Fix display name generation should be consistent between
RuleForEach
andRuleFor.ForEach
(#1231) - Allow
AddFluentValidation
to be called directly onIServiceCollection
(#1726) - Throw exception when calling
ValidateAndThrow
even ifPreValidate
prevents further validation (#1736) ValidationException
now includes rule severity (#1733)- Optionally support internal types when scanning assemblies for validators (#1742)
- Deprecate
RunDefaultMvcValidationAfterFluentValidationExecutes
in MVC configuration. UseDisableDataAnnotationsValidation
instead.
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
ErrorCode
is now exposed onIRuleComponent
Changes in 10.0.1
- Add
GetPropertyValue
toIValidationRule
to support #1688 - Context object is now strongly typed inside
IValidationRule<T>.ApplyCondition
/ApplyAsyncCondition
for 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.Errors
fromIList<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).
ValidatorDescriptor
now returns rule components in various places, wherePropertyValidators
were previously returned- Default service lifetime in ASP.NET projects is now
Scoped
rather thanTransient
. - Combined
IActionContextValidatorInterceptor
andIValidatorInterceptor
. - Changes to the ASP.NET Client Validator Adaptor interfaces. These now receive the rule component.
- Removed deprecated
IStringSource
and its inheritors. - Removed deprecated
FormattedMessageArguments
fromValidationFailure
. - Removed other deprecated code.
Downloads
Binaries can be downloaded from nuget:
- FluentValidation - Main package
- FluentValidation.AspNetCore - ASP.NET Core integration