Open gunndabad opened 1 month ago
When date input parsing encounters an error it produces an error using ModelMetadata's DisplayName https://github.com/gunndabad/govuk-frontend-aspnetcore/blob/main/src/GovUk.Frontend.AspNetCore/ModelBinding/DateInputModelConverterModelBinder.cs#L100
ModelMetadata
DisplayName
This is problematic when the display name is something like 'Enter start date' as we get error messages like 'Enter start date must be a real date'.
There should be a way to override the name used for producing parse errors e.g.
[DateInputMetadata(Name = "Start date")]
When date input parsing encounters an error it produces an error using
ModelMetadata
'sDisplayName
https://github.com/gunndabad/govuk-frontend-aspnetcore/blob/main/src/GovUk.Frontend.AspNetCore/ModelBinding/DateInputModelConverterModelBinder.cs#L100This is problematic when the display name is something like 'Enter start date' as we get error messages like 'Enter start date must be a real date'.
There should be a way to override the name used for producing parse errors e.g.