Minor Blazor form validation improvements - #37735
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The fundamentals article needs its metadata date updated, and one spacing error remains.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Improves Blazor form validation guidance and adds a .NET 11 asynchronous validation example.
Changes:
- Documents
EditContextlifecycle and field identity. - Demonstrates CSS classes on surrounding markup.
- Adds property-level asynchronous validation.
| File | Description |
|---|---|
aspnetcore/blazor/forms/binding.md |
Explains model replacement behavior. |
aspnetcore/blazor/forms/validation.md |
Clarifies field identity and CSS styling. |
aspnetcore/fundamentals/validation.md |
Adds an asynchronous validation attribute example. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@copilot Fix the code for all comments in this review thread. When a review comment includes a suggested change, apply the suggestion exactly. Do not make changes beyond what is described in the linked review thread. |
Co-authored-by: oroztocil <79744616+oroztocil@users.noreply.github.com>
Fixed in 8a1d922: removed the extra space before |
guardrex
left a comment
There was a problem hiding this comment.
One tiny XREF change spotted.
|
BTW ... I'm trying to get my XREF gen tool fixed. Can you provide an approval on ... ... and then it will start working properly again ... |

A few small additions and phrasing improvements I realized I want to do after reading through the docs on the live website.
Summary
EditForm.Modelresets modification and validation state.ValidationMessage.Foridentifies fields throughFieldIdentifier.EditForm.ContextandFieldCssClass.AsyncValidationAttributeexample with dependency injection, cancellation, member association, and synchronous fallback.Verification
Internal previews
Build report