Upgrading FluentValidation 10 to 11
Breaking10.4.0 → 11.12.0Breaking7Deprecated12New36Changed34Fixed32Other4
BreakingUpgrade verdict
7 breaking changes.
In plain terms
- The old OnFailure and OnAnyFailure callbacks are gone; use the newer equivalents.
- The old ASP.NET setting for running default MVC validation after FluentValidation is removed.
- The old Options property on RuleComponent is removed.
- Old testing helper methods that were marked deprecated are removed.
Must act Top 5 of 19 that need code or config changes
Target frameworks requirement changed in 11.9.0: .NETStandard2.0, .NETStandard2.1, net5.0, net6.0 → .NETStandard2.0, .NETStandard2.1, net5.0, net6.0, net7.0, net8.0.
Adds system.threading.tasks.extensions 4.5.4.
What you must change
Breaking7
Removes the deprecated OnFailure/OnAnyFailure callbacks.
OnFailureOnAnyFailureRemoves the deprecated RunDefaultMvcValidationAfterFluentValidationExecutes option from the ASP.NET integration.
RunDefaultMvcValidationAfterFluentValidationExecutesRemoves the deprecated Options property from RuleComponent.
RuleComponent.OptionsRuleComponentRemoves deprecated TestHelper methods.
TestHelperRemoves the non-generic PropertyValidator backwards compatibility layer.
PropertyValidatorThrows exceptions when an async validator is invoked synchronously.
Throws exceptions when an async validator is invoked synchronously.
Deprecations to plan for
Deprecated12
Deprecates disabling the root model null check by overriding AbstractValidator.EnsureInstanceNotNull.
AbstractValidator.EnsureInstanceNotNullDeprecates the Transform and TransformAsync methods.
TransformTransformAsyncDeprecates the ScalePrecision validator and introduces PrecisionScale as its replacement.
ScalePrecisionPrecisionScaleDeprecates the ScalePrecision validator and introduces PrecisionScale as its replacement.
ScalePrecisionPrecisionScaleDeprecates implicit validation of child properties in MVC auto validation.
Deprecates implicit validation of root collection elements in MVC auto validation.
Deprecates InjectValidator.
InjectValidatorDeprecates IValidatorFactory and ServiceProviderValidatorFactory.
IValidatorFactoryServiceProviderValidatorFactoryDeprecates implicit validation of child properties in MVC auto validation.
Deprecates implicit validation of root collection elements in MVC auto validation.
Deprecates InjectValidator.
InjectValidatorDeprecates IValidatorFactory and ServiceProviderValidatorFactory.
IValidatorFactoryServiceProviderValidatorFactory