阅读背景:

ASP.NET MVC - 如何在EditorTemplates中使用Required消息

来源:互联网 

I have a simple model:

我有一个简单的模型:

    public abstract class Person
    {
        [Required(ErrorMessage = "Il nome è obbligatorio!!!")]
        [UIHint("txtGeneric")]
        [Display(Name = "Nome")]
        public string Name { get; set; }

        [Required(ErrorMessage = "Il cognome è obbligatorio!!!")]
        [UIHint("txtGeneric")]
        [Display(Name = "Cognome")]
        public string Surname { get; set; }

        [Required(ErrorMessage = "L'email è obbligatoria e deve essere in formato valido ([email protected])!!!")]
        [UIHint("txtEmail")]
        [Display(Name = "E-mail")]
        public string Email { get; set; }
}
    publi



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

分享到: