Given a model with these data annotations:
public class Example
{
[Required]
[Display(Name = "Activity response")]
public string ActivityResponse { get; set; }
}
I would expect the model state error message to be "The Activity response field is required." Instead it is "The ActivityResponse field is required."
Comments: I don't have a lot of time to dig through Web Api source at the moment, but if someone could point me at the class that has not implemented the expected behavior I'd appreciate it. Then maybe I can create a modified version of the class that takes display name into account, and swap out it in.
public class Example
{
[Required]
[Display(Name = "Activity response")]
public string ActivityResponse { get; set; }
}
I would expect the model state error message to be "The Activity response field is required." Instead it is "The ActivityResponse field is required."
Comments: I don't have a lot of time to dig through Web Api source at the moment, but if someone could point me at the class that has not implemented the expected behavior I'd appreciate it. Then maybe I can create a modified version of the class that takes display name into account, and swap out it in.