Well, there is no way to "Elegantly" ignore errors when using standard data attributes.
You have several options. The quick and dirty (i.e. inelegant) way is to simply clear the corresponding errors from ModelState in your controller.
if (some condition) { ModelState["controlName"].Errors.Clear(); }
You can also write your own data attributes that use conditional testing. Something like described here:
http://blogs.msdn.com/b/simonince/archive/2011/02/04/conditional-validation-in-asp-net-mvc-3.aspx
A third approach would be to avoid attributes and use a validation framework like FluentValidation
The final option would be to use JavaScript to determine the correct state of the data, and then change the URL of the form to publish to another Action method. You can then decorate the parameters of the action method with Bind attributes to exclude data elements that you do not want. However, I would not recommend this because it requires the client to be involved in the server-side validation process.
source share