Кто-нибудь видел это исключение раньше? У Google или Bing совсем немного результатов.
IsValid(object value) has not been implemented by this class.
The preferred entry point is GetValidationResult() and classes should override
IsValid(object value, ValidationContext context).
Вот пользовательский валидатор:
public class PriceAttribute : ValidationAttribute
{
public string Id { get; set; }
protected override ValidationResult IsValid(object value, ValidationContext validationContext)
{
//I think this definition for IsValid is in DataAnnotations 4.0
return base.IsValid(value, validationContext);
}
public override bool IsValid(object value)
{
//This I think is the older definition. Not sure why it expects this
return base.IsValid(value);
}
}
Спасибо!