Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions aspnetcore/blazor/forms/input-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -462,17 +462,17 @@ The validation summary displays the friendly name when the field's value is inva

:::moniker range=">= aspnetcore-11.0"

The <xref:Microsoft.AspNetCore.Components.Forms.DisplayName%601> component can be used to display property names from metadata attributes. The [`[Display]` attribute](xref:System.ComponentModel.DataAnnotations.DisplayAttribute) on the model class property is supported:
The <xref:Microsoft.AspNetCore.Components.Forms.DisplayName%601> component can be used to display property names from metadata attributes.

```csharp
[Required, Display(Name = "Production Date")]
[Required, DisplayName("Production Date")]
public DateTime ProductionDate { get; set; }
```

The [`[DisplayName]` attribute](xref:System.ComponentModel.DisplayNameAttribute) is also supported:
The [`[Display]` attribute](xref:System.ComponentModel.DataAnnotations.DisplayAttribute) on the model class property is supported:

```csharp
[Required, DisplayName("Production Date")]
[Required, Display(Name = "Production Date")]
public DateTime ProductionDate { get; set; }
```

Expand Down
Loading