我得到了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)
但如果我留下一个验证器 - 一切正常.我该怎么做才能为字段提供更多的验证.