diff --git a/aspnetcore/blazor/forms/input-components.md b/aspnetcore/blazor/forms/input-components.md index bc3bfb41628b..92ca564cd69f 100644 --- a/aspnetcore/blazor/forms/input-components.md +++ b/aspnetcore/blazor/forms/input-components.md @@ -462,17 +462,17 @@ The validation summary displays the friendly name when the field's value is inva :::moniker range=">= aspnetcore-11.0" -The 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 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; } ```