[release/11.0] Replace IValidationMessageFormatter with ValidationAttribute.FormatMessage - #69116
Open
github-actions[bot] wants to merge 1 commit into
Open
[release/11.0] Replace IValidationMessageFormatter with ValidationAttribute.FormatMessage#69116github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
Contributor
|
Hi @github-actions[bot]. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge. To learn more about how to prepare a servicing PR click here. |
Youssef1313
approved these changes
Sep 8, 2026
artl93
approved these changes
Sep 8, 2026
artl93
left a comment
Member
There was a problem hiding this comment.
New in .NET 11. Completing features. Approved.
Contributor
|
Hi @github-actions[bot]. This PR was just approved to be included in the upcoming servicing release. Somebody from the @dotnet/aspnet-build team will get it merged when the branches are open. Until then, please make sure all the CI checks pass and the PR is reviewed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #69027 to release/11.0
/cc @oroztocil
Drops the MEV-specific
IValidationMessageFormatterinterface in favor of the equivalent BCL API.Description
Microsoft.Extensions.Validation(MEV) addedIValidationMessageFormatterin #67987 (approved in #66392) so that custom validation attributes could inject attribute-specific arguments into localized error message templates.Since then, a functionally equivalent API was approved and added directly to the
ValidationAttributebase class in the BCL:ValidationAttribute.FormatMessage(string format, string name)(proposal dotnet/runtime#132605, implementation dotnet/runtime#132853). Because it serves the same need at a lower layer, this change removes the MEV interface and calls the base class method instead.Customer Impact
IValidationMessageFormatteris new in .NET 11 and has not shipped in a stable release. This change means we avoid shipping two overlapping mechanisms for the same purpose and it removes the need for custom validation attributes to reference the MEV namespace.Regression?
Risk
The removed interface has not shipped stable, and the replacement is a drop-in. The change is confined to the validation localization path and is covered by existing automated tests.
Verification
Packaging changes reviewed?