阅读背景:

我可以使用属性和ModelState.AddModelError来验证asp.net mvc中的模型属性吗?

来源:互联网 

In my asp.net mvc 3 project I use [Required] attributes on properties that need to be validated. Also I use ModelState.AddModelError to add errors to the same properties (with attributes). The errors added with the second approach doesn't show up. What could be the reason? In my asp.net mvc 3 project I use [Required] at




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: