[release/11.0] Fix Blazor client-side validation support for custom attributes - #69026
Merged
Merged
Conversation
* Fix Blazor client-side validation initialization to better support custom validator registration * Try IClientValidationRuleProvider first in client validation rule generation to support derived built-in attributes
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. |
kotlarmilos
approved these changes
Sep 4, 2026
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 #69020 to release/11.0
/cc @oroztocil
Fixes two problems in support for custom validation attributes in the Blazor SSR client-side validation feature.
Description
In .NET 11, we are adding a client-side validation feature for statically rendered Blazor forms. This feature allows static Blazor forms to give immediate validation feedback as the user is typing (i.e. without a full form submit). This is backed up by validation rules which are rendered into page based on .NET validation attributes and later enforced by JS code on the client.
The initial Preview release of the feature contains two problems in how user-defined validation attributes are supported:
Customer Impact
Without this fix, a new user-facing validation feature is incomplete or unnecessarily difficult to use with user-defined validation attributes. This would decrease the usefulness of the feature, and could be seen as a regression compared to a similar feature previously available in MVC, blocking MVC users from migrating to Blazor SSR.
Regression?
Risk
Two small fixes for a completely new feature.
Verification
Packaging changes reviewed?