Need to perform validation on a model’s property based on some other state of the model? Here’s a way to achieve it using the IValidatableObject interface and data annotations.
In our example project we want to validate the state field is a valid Australian state if the country field is “Australia”.


