We have a registration form that asks for demographic information with the additional option to not provide any information. However, to keep our numbers adding up properly, we want to require you to enter all information if you select any demographics. A rendering of the form:
- Gender
- ( ) Male
- ( ) Female
- Disabilities?
- ( ) Yes
- ( ) No
- Race
- ( ) A
- ( ) B
- ( ) C
- ( ) I do not wish to provide demographic information
We want to allow selection of "I do not wish..." and all options, e.g. "Male/Yes/A", but not partial answers, e.g. "Female/C".
How can we structure the .validate() rules and options to achieve this goal? Ideally, we would have a single label show/hide if your response is not sufficient.
Additional information:
- Using the jQuery Validation Plugin
- Demographics types are dynamically created from a database list