Validation constraints for Checkbox Questions


I am aware of how to constrain so that you cannot select “none” as well as another answer. However, I am trying to program so that you cannot select “10-14 years” as well as “15-17” years, but need it to be a checkbox question because it is possible that you can be both “10-14 years” and “Club member”. Some options are mutually exclusive, some are not.

Would I do this using the not(selected(., ‘none’) and count-selected(.) > 1) format and maybe do not(selected(., ‘10-14 years’) and selected(.) = “15-17 years”) or something like that?

Hi Amanda,

Thanks for the patience with your response.

The second of the two proposed expressions seems like the right one to me, something like

not(selected(. , ‘option-one’) and selected(., ‘option-two’))

which would prevent the user from choosing any combination of boxes which included both option-one and option-two.

One important thing to note: Checkbox questions can’t have spaces in their “value” portion, so “10-14 years” wouldn’t be a valid value. You’d need to set the Label to be “10-14 years”, but choose a value with no spaces, like 10_14_years