如何确保我的电子邮件字段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)