Welcome to the LimeSurvey Community Forum

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

Error while adding question validation equation

More
1 year 1 month ago #266066 by nadica123
Please help us help you and fill where relevant:
LimeSurvey version: 6.3.4
Own server or LimeSurvey Cloud: own server
Survey theme/template: Fruity
==================
(Write here your question/remark)

Hello,

I am trying to input a question validation equation for a multiple choice question where the other option is a fill in. I'm getting this error though and not sure what I am doing wrong.
 
I want to validate that the number that will be entered will be starting with +31 and after that 9 digits will follow.
 

Thank you.

 

Please Log in to join the conversation.

More
1 year 1 month ago #266068 by Joffm
Hi,
1. It is wrong syntax; there are two slashes missing
regexMatch("/^\+31\d{9}$/",Q1_other)

2. The main issue.
The leading "+" is not stored. There are some other threads about this here.
 
As the "+31" is a constant value you may only show it in front of the entry field with
regexMatch("/^\d{9}$/",Q1_other)
 
 

Or you force a "0031"
 

Or you redesign the question and use an inputmask.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

More
1 year 1 month ago #266075 by DenisChenu

2. The main issue.
The leading "+" is not stored. There are some other threads about this here.
 

 
On a non numerical value ?

It's a BIG BIG issue !!!!
Nort reported ?

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.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose