Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Commented Issue: UpForGrabs: Web Api ModelState validation is ignoring the DisplayAttribute [744]

$
0
0
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: Any ideas for a temp fix for this? This is currently game breaking for us as we can't accurately tell our users which field(s) didn't pass server side model validation.

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>