Professional > Interview scripting > Writing interview scripts > Dealing with errors > Using a custom validation function
 
Using a custom validation function
You'll need a custom validation function whenever you want to perform validation that is not covered by any of the standard error messages. For example, suppose you 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'll need to create one of your own, and then write the necessary code to test the answers chosen and apply the message if appropriate.
See also
Defining the error message
Writing the validation function
Variables in error messages
Adding extra validation during interviewing
General rules for validation functions
Checking for unique ranks in a categorical ranking grid
Validating grids that contain more than one question
Dealing with errors