Check out the LimeSurvey source code on GitHub!

RegEx Validation: Mobile Number

More
4 years 10 months ago #77490 by karlo
Hello,

I love using LimeSurvey however, I am encountering a small issue. Basically, it's just a mobile phone validation thing. The number should start with "09" and then checks the range of numbers, the operator code and then just checks 7 numbers after it. Simple as that.

Example, "09171234567" is a valid one and "09471234567" is invalid.

I tried using an online RegEx validator as well as using RegEx Buddy. It works.

However, it doesn't work with the latest version of LimeSurvey.

Here is the RegEx code:
^09(05|06|15|16|17|25|26|27|35|36|37|45|94|95|96|97|17)\d{7}$

Please help me.

Please Log in to join the conversation.

More
4 years 10 months ago #77491 by TMSWhite
Where are you putting the Regex validation? In the question validation field? In JavaScript? Other? Can you export the question that isn't working as .lsq so we can test it?

Please Log in to join the conversation.

More
4 years 10 months ago #77493 by karlo

TMSWhite wrote: Where are you putting the Regex validation? In the question validation field? In JavaScript? Other? Can you export the question that isn't working as .lsq so we can test it?


In the validation field. Here you go.
Attachments:

Please Log in to join the conversation.

More
4 years 10 months ago #77877 by karlo
OMG, I can't believe this. No one actually helped me out with this. Darn. Is this the open community that you call?

Please Log in to join the conversation.

More
4 years 10 months ago #77892 by tpartner
Well, that's a good way to get a response!

Complaints can be sent with our paycheques.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

More
4 years 10 months ago #77924 by Mazi

tpartner wrote: Well, that's a good way to get a response!

Complaints can be sent with our paycheques.

Sorry that I was playing with my little daugther on Sunday afternoon instead of answering your questions, karlo!


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form