Skip to content

Commit 1e40fbf

Browse files
authored
Blazor forms updates (#19870)
1 parent c44f6aa commit 1e40fbf

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

aspnetcore/blazor/forms-validation.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ A set of built-in components are available to receive and validate user input. I
9090
| <xref:Microsoft.AspNetCore.Components.Forms.InputText> | `<input>` |
9191
| <xref:Microsoft.AspNetCore.Components.Forms.InputTextArea> | `<textarea>` |
9292

93+
> [!NOTE]
94+
> The `InputRadio` and `InputRadioGroup` components are available in ASP.NET Core 5.0 or later. For more information, select a 5.0 or later version of this article.
95+
9396
::: moniker-end
9497

9598
All of the input components, including <xref:Microsoft.AspNetCore.Components.Forms.EditForm>, support arbitrary attributes. Any attribute that doesn't match a component parameter is added to the rendered HTML element.
@@ -374,7 +377,7 @@ In the following example:
374377

375378
When validation messages are set in the component, they're added to the validator's <xref:Microsoft.AspNetCore.Components.Forms.ValidationMessageStore> and shown in the <xref:Microsoft.AspNetCore.Components.Forms.EditForm>:
376379

377-
```csharp
380+
```razor
378381
@page "/FormsValidation"
379382
380383
<h1>Starfleet Starship Database</h1>
@@ -565,7 +568,7 @@ In the client project, add the validator component shown in the [Validator compo
565568

566569
In the client project, the *Starfleet Starship Database* form is updated to show server validation errors with help of the `CustomValidator` component. When the server API returns validation messages, they're added to the `CustomValidator` component's <xref:Microsoft.AspNetCore.Components.Forms.ValidationMessageStore>. The errors are available in the form's <xref:Microsoft.AspNetCore.Components.Forms.EditContext> for display by the form's <xref:Microsoft.AspNetCore.Components.Forms.ValidationSummary>:
567570

568-
```csharp
571+
```razor
569572
@page "/FormValidation"
570573
@using System.Net
571574
@using System.Net.Http.Json

0 commit comments

Comments
 (0)