Validating response in a roster

Hello

I have two important questions.
First:

I am creating a questionnaire where I am first taking a list of household members, followed by a single select question to input who is the main respondent.

Then I have a household roster in my questionnaire. In the roster, I have a single-select question to select the relation to the main respondent. The question has options like ‘1. Spouse, 2. Father/ mother-in-law, 3. Children 4. Other members’

I want to ensure that the option ‘Spouse’ is selected only once in the roster. Is there a way to add a validation for the same?

Second:

I was trying to make certain questions mandatory to be filled. I tried the isAnswered(self) function as an enabling condition (I found the solution on a Support page), to check if the current question has been filled. But this leads to an error. Is there another way to do this?

Thank you.

Surabhi, I don’t know how this can be made more clear:
http://support.mysurvey.solutions/customer/en/portal/articles/2789716-mandatory-required-questions
Sergiy

Hi Sergiy
I have a questionnaire with 20 questions, I need that those 20 questions mandatory. What code should I use? All those questions are type single select question

Thanks you

For those forum members reading this, the IsAnswered(self) was mentioned as an example of what does not work in the support page and the reasons explained there.