IValidatableObject Validate method firing when DataAnnotations fails

Considerations after comments’ exchange: The consensual and expected behavior among developers is that IValidatableObject‘s method Validate() is only called if no validation attributes are triggered. In short, the expected algorithm is this (taken from the previous link): Validate property-level attributes If any validators are invalid, abort validation returning the failure(s) Validate the object-level attributes If … Read more

How do I use IValidatableObject?

First off, thanks to @paper1337 for pointing me to the right resources…I’m not registered so I can’t vote him up, please do so if anybody else reads this. Here’s how to accomplish what I was trying to do. Validatable class: public class ValidateMe : IValidatableObject { [Required] public bool Enable { get; set; } [Range(1, … Read more