如何在警告框中显示[远程]错误()

时间:2016-07-25 07:55:17

标签: c# asp.net-mvc asp.net-mvc-3

如何确保我的电子邮件字段ValidationMessageFor仅显示" Remote"错误而不是必需 - 错误。

AND Alert Error出现在警告框()

[Required(ErrorMessage = "Skriv venligst din e-mailadresse")]
[EmailAddress(ErrorMessage = "Ugyldig e-mailadresse")]
[Remote("DoUserExist","Home",ErrorMessage = "E-mail already in use")]
[DataType(DataType.EmailAddress)]
public string Emailaddress{ get; set; }



 @Html.TextBoxFor(model => model.Emailaddress, new { @placeholder = "E-mailadresse" })
 @Html.ValidationMessageFor(model => model.Emailaddress)

0 个答案:

没有答案