Skip to content

Enhance EditContext to support field-level validation state change notification#67147

Open
vendasankarsf3945 wants to merge 3 commits into
dotnet:mainfrom
vendasankarsf3945:fix-44284-editcontext-issue
Open

Enhance EditContext to support field-level validation state change notification#67147
vendasankarsf3945 wants to merge 3 commits into
dotnet:mainfrom
vendasankarsf3945:fix-44284-editcontext-issue

Conversation

@vendasankarsf3945

Copy link
Copy Markdown

Blazor: Add field-level validation state notification support in EditContext

Description

Adds support for field-level validation state notifications in EditContext to improve how validation updates are propagated in Blazor forms.
Currently, validation state change notifications do not provide information about the affected field, forcing consumers to treat every update as a full-form change. This makes it difficult to implement efficient, targeted validation UI updates.
This change enhances the validation notification mechanism by allowing a FieldIdentifier to be associated with validation state changes, enabling more granular handling while preserving existing behavior.

Before:

EditContext.NotifyValidationStateChanged() always triggered a global validation state change without indicating which field caused the update. As a result, consumers handling OnValidationStateChanged events could not determine the affected field and were required to reprocess the entire form even for single-field updates.
For example, custom validation components or UI logic reacting to validation changes had to refresh or re-evaluate all fields because there was no way to identify the specific field that changed.

After:

Validation state notifications can now optionally include a FieldIdentifier, allowing EditContext to notify changes for a specific field.
Consumers can now detect which field triggered the validation update and perform targeted UI updates instead of reprocessing the entire form. Existing behavior is preserved when no field is specified, ensuring full backward compatibility.
With this change, developers can build more efficient validation experiences by reacting only to the affected field rather than the entire form.

Fixes #44284

@vendasankarsf3945 vendasankarsf3945 requested a review from a team as a code owner June 11, 2026 08:26
@vendasankarsf3945

Copy link
Copy Markdown
Author

@dotnet-policy-service agree company="Syncfusion, Inc."

@github-actions github-actions Bot added the area-blazor Includes: Blazor, Razor Components label Jun 11, 2026
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Jun 11, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Thanks for your PR, @vendasankarsf3945. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-blazor Includes: Blazor, Razor Components community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant