Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Validation for Subquestions using 'self'

More
9 years 7 months ago #129793 by BillLenoir
I want to make sure that each subquestion in an Array(Numbers) is a whole number. I have entered the following for "Question Validation Equation":

(regexMatch('/^[0-9]*$/',UgEnrollmentCy_DegSeekingFirstYear_FtMale))

Perfect, works great. But I don't want to have to do this for each of the 25 subquestions. However, if I try this:

(regexMatch('/^[0-9]*$/',self))

The system replaces 'self' with pointers to all 25 subquestions, so the regexMatch fails for having too many attributes.

What can I do?
The topic has been locked.
More
9 years 7 months ago #129800 by DenisChenu
Hi,

self give an array , regexMatch wait for styring : this broke.

Feauture request linked : bugs.limesurvey.org/view.php?id=8348
But here : different feature needed.

You have to do regexMatch and regexMatch and regexMatch .... manually

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
9 years 5 months ago #133684 by first
What about placing (regexMatch('/^[0-9]*$/',self)) in validation field that is just below relevance field. It worked for me.

Survey Designer and Programmer
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose