I have an entity being used in many parts of my application. I need to add validation to one of its properties. The problem is that I do not need to validate this property in every part of my application.
I considered using a custom attribute, but then I would not be sure how to bypass the validation in (because it does not depend on other property, it really depends on the part of the application I am using it).
I considered using an interface and have two implementations - one with this attribute, one without. But there is too much coupling in my application and that may be too much work.
Eventually, I could just create a static class to validate it. But I am wondering if there would be a more MVCish option? Thanks!