Using a custom validation function
To perform validation that is not covered by any of the standard error messages, use a custom validation function.
For example, you might have a response list with two subsections, and you want respondents to select answers from one section or the other only. There is no standard message that you can display if a respondent selects responses from both sections so you must write code to test the answers chosen and apply the message if appropriate.
See also