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: Thank you for the feedback, and thank you kichalla for looking deeper. Will this issue be fixed in vNext or a workaround be proposed? I've taken a look at the code, and with the way ModelMetadata is embedded in web api I can't figure out a workaround. I'm disappointed to see that the Impact is considered Low. I wouldn't consider it low impact, but perhaps those who wrote it don't use the server-side validation messages and prefer to duplicate server side code on the client, or do things in some other way I'm not familiar with. Also, I discovered that this bug affects other 3rd-party libraries like breeze.js. Another reason not to consider it low impact.
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: Thank you for the feedback, and thank you kichalla for looking deeper. Will this issue be fixed in vNext or a workaround be proposed? I've taken a look at the code, and with the way ModelMetadata is embedded in web api I can't figure out a workaround. I'm disappointed to see that the Impact is considered Low. I wouldn't consider it low impact, but perhaps those who wrote it don't use the server-side validation messages and prefer to duplicate server side code on the client, or do things in some other way I'm not familiar with. Also, I discovered that this bug affects other 3rd-party libraries like breeze.js. Another reason not to consider it low impact.