Skip to content

Rename underscore-prefixed validation sample fields - #672

Merged
guardrex merged 3 commits into
mainfrom
copilot/rename-undescore-prefixed-fields
Sep 22, 2026
Merged

guardrex merged 3 commits into
mainfrom
copilot/rename-undescore-prefixed-fields

Conversation

Copilot AI commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

PR #662 introduced underscore-prefixed private fields in Blazor validation docs samples, which conflicts with the sample convention of camelCase field names without leading underscores.

  • Field naming

    • Renamed _messages to messages in the .NET 11 async validation samples.
    • Renamed _remoteErrors to remoteErrors and _accepted to accepted in the remote validation form.
    • Updated all Razor markup and C# references for the renamed fields.
  • Scoped cleanup

    • Left framework/path identifiers such as _Imports and _framework unchanged.
    • Renamed a local tuple variable to avoid shadowing the new messages field name.

Example:

<CustomValidation @ref="remoteErrors" />

@if (accepted)
{
    <p id="accepted" role="status">The server accepted the form.</p>
}

Copilot AI and others added 2 commits September 22, 2026 16:28
Co-authored-by: oroztocil <79744616+oroztocil@users.noreply.github.com>
Co-authored-by: oroztocil <79744616+oroztocil@users.noreply.github.com>
Copilot AI changed the title [WIP] Rename underscore-prefixed fields in Blazor documentation samples Rename underscore-prefixed validation sample fields Sep 22, 2026
Copilot AI requested a review from oroztocil September 22, 2026 16:30
@oroztocil
oroztocil requested a lite review from Copilot September 22, 2026 19:15
@oroztocil
oroztocil marked this pull request as ready for review September 22, 2026 19:15
@oroztocil
oroztocil requested a review from guardrex September 22, 2026 19:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

No unresolved review issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Renames underscore-prefixed fields in .NET 11 Blazor validation samples to match naming conventions without changing behavior.

Changes:

  • Renamed validation message stores.
  • Renamed remote validation fields to remoteErrors and accepted.
  • Updated references and avoided tuple-variable shadowing.
File Description
11.0/​BlazorWebAppRemoteValidation/​BlazorWebAppRemoteValidation.Client/​Pages/​Home.razor Renames remote validation state fields and references.
11.0/​BlazorWebAppRemoteValidation/​BlazorWebAppRemoteValidation.Client/​CustomValidation.razor Renames the validation message store and tuple variable.
11.0/​BlazorSample_BlazorWebApp/​Components/​UsernameUniquenessValidator.razor Renames the async validation message store.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@guardrex
guardrex merged commit d365744 into main Sep 22, 2026
3 checks passed
@guardrex
guardrex deleted the copilot/rename-undescore-prefixed-fields branch September 22, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants