0

我不希望我的页面在显示验证 ajax 错误后回发 这是我的验证类。我在我的验证类上使用了 romet 验证我认为我应该在使用它时设置一些东西

    [RegularExpression(@"^[a-zA-Z]+(([\'\,\.\- ][a-zA-Z ])?[a-zA-Z]*)*\s+<(\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,3})>$|^(\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,3})$", ErrorMessageResourceType = typeof(AlibabaVersion_2.MainResource), ErrorMessageResourceName = "EmailAddressMostBeComplite")]
    [Required(ErrorMessageResourceType = typeof(AlibabaVersion_2.MainResource), ErrorMessageResourceName = "UserEmailIsMandatory")]
    [DataType(DataType.EmailAddress)]
    [Display(Name = "EmailAddress", ResourceType = typeof(AlibabaVersion_2.MainResource))]
    [System.Web.Mvc.Remote(action: "CheckEmail",
                          controller: "Home",
                          HttpMethod = "POST",
                          ErrorMessageResourceType = typeof(AlibabaVersion_2.MainResource),
                           ErrorMessageResourceName = "UserEmailIsDublicate")]
    public string UserEmail { get; set; }

请帮我 :(

4

1 回答 1

1

如果您使用表单方法作为帖子应该可以工作。

于 2013-12-01T20:26:51.863 回答