Custom Validation Code
Last updated
Last updated
(c) 2024 Data Illusion Zumbrunn. All rights reserved. Reproduction strictly forbidden.
You may add custom javascript that gets executed on the go to validate the current respondent input.
You may also cross check the values of other respondent answers in the survey using the surveyAnswers array containing all the answers to the questions that were answered by the respondent so far.
Your custom method must either return null if your check have passed or return an object with with a message property that will be shown to the user as an error message.
Here are basic sample of a method that checks that the respondent has entered something in the answer field.
The answer control is an Angular form control object as such we can get its value using following notation answerControl.value.