Welcome to the LimeSurvey Community Forum

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

Validation for Subquestions using 'self'

  • BillLenoir
  • BillLenoir's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 3 months ago #129793 by BillLenoir
Validation for Subquestions using 'self' was created 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.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 3 months ago #129800 by DenisChenu
Replied by DenisChenu on topic Validation for Subquestions using 'self'
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 service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
More
8 years 2 weeks ago #133684 by first
Replied by first on topic Validation for Subquestions using 'self'
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.

Lime-years ahead

Online-surveys for every purse and purpose