Side by side question custom validation | XM Community
Skip to main content

Hi, I would like to do a custom validation for family profile but it seems like I might do the wrong way.
For this survey, I will have a respondent filling in their family profile (e.g. parents, sibling, spouse) and I need to do some basic validation for the age.
These are some of the rules

  1. The parents cannot be younger than the respondent

  2. The age of the spouse must be 18 and above

  3. The age of the child must be younger than respondent and should not be younger than 2020

  4. The age of the sibling should not be younger than 2020. (If possible, I hope this can validation against the parents' age)

The following is how it is being show in the survey.
FM.PNG

Hi tawjam,
I see what you're trying to do here, but it is going to be tough to do everything you want using a side-by-side table. I'm not sure if this question relates to members of a single household, or the respondent's immediate family members (regardless of whether they live together or not), but either way I would probably break this up into multiple questions of different types, that way you can avoid validating relationships that don't exist (for instance, a respondent whose father does not live in the household or is not alive, someone without siblings, or a person without children).
If the questions relate to household members, maybe first ask which parents live in the respondent's household (Both/One/None), and then have numeric entry fields appear where they can enter age or DOB. Repeat for similar question with siblings and children, and use the numeric entry fields to validate the age of each additional member of the household.


Leave a Reply