I have created my own conditional validation attribute to validate my MVC model on both the client and the server by inheriting from RequiredAttribute and imple
RequiredAttribute
You should check out Foolproof Validation. It does what you are trying to do without you having to roll your own.