2 years ago
#7077

sud
How can we extend the IValidatableObject class to return a Custom object instead of ValidationResult?
I need to perform business validations on my model that implements the IValidatableObject Interface which contains a Validate method that returns an IEnumerable of ValidationResult. I want to return a subclass of ValidationResult that not just have ErrorMessage but also the ErrorCode as a different property.
c#
validation
data-annotations
0 Answers
Your Answer