I've got a form as part of an e-commerce checkout process which has a section for billing address which allows the user to use their delivery address or to fill in an address in the form. If the user selects to use their delivery address I don't show the address fields.
I've added validation for all fields then on the server side I check which option was selected and remove any validation errors for fields that are now hidden. This works fine on the server site but I'd like to use MVC 2's client side validation and need some way of doing the same on the client side.
What I'd like is a way of getting the javascript validation to ignore any hidden fields. Is there a good way of doing this or is it a case of hacking the MicrosoftMvcJQueryValidation.js file?