Two Constraints in One Question

Can you put two constrain in one question?

It is a multiple select type question, the maximum choice is 3 and the ‘none’ option cannot be selected with other choices.

Can i put both constraints in one question?

Thank you.

Welcome back @wiydiy,

This post from Kal could help you:


Yes, you can use the constraint.

count-selected( . ) < 4 and ((. = ‘98’) or not(selected(.,‘98’))) use this constraint, where 98 is code of none, you can use your own code as well.

Dinesh Dongol


thank youuu i will try… but I guess I cannot modify the error message for when each constraint? only 1 constraint message is allowed?

1 Like

thanks, I will soon check! :slight_smile:

1 Like

Hello @wiydi,
Yes, you need one combined contraint_msg text for the combined constraints.


will do it,. Thank youuu :slight_smile:

1 Like