相关疑难解决方法(0)

流畅的验证.错误:不显眼的客户端验证规则中的验证类型名称必须是唯一的

我得到了erorr:

不显眼的客户端验证规则中的验证类型名称必须是唯一的.以下验证类型不止一次出现:必需.以下验证类型不止一次出现:必需

我用过服务器验证.一切正常.但现在我说要使用客户端验证,我遇到了这个问题.

这是我的验证类代码:

public class TestViewDataValidation : BaseTestCreateViewDataValidation<BaseTestCreateViewData>
    {

public TestViewDataValidation ()
        {
            this.RuleFor(x => x.Login).NotNull();
            this.RuleFor(x => x.Login).NotEmpty();
            this.RuleFor(x => x.Login).EmailAddress();          
        }
}
Run Code Online (Sandbox Code Playgroud)

但如果我留下一个验证器 - 一切正常.我该怎么做才能为字段提供更多的验证.

jquery fluentvalidation c#-4.0 asp.net-mvc-3

14
推荐指数
2
解决办法
9088
查看次数

标签 统计

asp.net-mvc-3 ×1

c#-4.0 ×1

fluentvalidation ×1

jquery ×1