This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
ModelState error for FormatException should show DisplayName of the problematic property if available #3227
Closed
Description
ModelStateDictionary
adds Resources.ModelError_InvalidValue_GenericMessage
and Resources.ModelError_InvalidValue_MessageWithModelValue
messages when a FormatException
occurs. This message includes the full key (property / collection path) e.g. "model.Customer.Name". For consistency with MVC 5 and usability, should instead use the DisplayName
of the problematic property and fall back to the property name.