【发布时间】:2015-04-08 08:17:07
【问题描述】:
我创建了这个模型类:
public class test5
{
[Required] //when title field empty send from client this is show this messae" The title field is required."
public string title { get; set; }
public int content { get; set; }
}
我想将必填字段错误消息编辑为自定义消息,当我使用 [Required] 之类的验证时,任何地方都会显示该错误消息。我该怎么做?
【问题讨论】:
标签: asp.net-mvc validation model-view-controller