Welcome to the LimeSurvey Community Forum

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

Regex Check: Only wrong answers are marked correct

  • urbana
  • urbana's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
1 month 3 days ago #266479 by urbana
Please help us help you and fill where relevant:
LimeSurvey version: 6.5.3
Own server or LimeSurvey Cloud: selfhosted
Survey theme/template: 
==================
 I have this regex: /^\+[0-9]{8,}/ to check if the answer is a number starting with a +
The strange thing is, this results in an error (Please check your answer):
+43123456789

And this is marked as correct:
+43123456789s

I its is only marked as correct, when I have a + 8 numbers AND any other character that isn't a number or whitespace

No idea why... what did I wrong?
Thanks for your help

 

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 3 days ago #266480 by tpartner
If you want exactly 8 digits remove the comma in {8,}.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose