Welcome to the LimeSurvey Community Forum

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

Error using a numeric entry for a question and a regular expression together

  • sergiovc
  • sergiovc's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 4 months ago #143552 by sergiovc
I'm using a numeric entry for a question and using a regular expression, I want the number of digits to enter can be exactly eight digits.
I used /^[0-9]{8}$/, but when I enter a number beginning with 0 (zero) shows me error.
What should I do?
TIA
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 4 months ago #143555 by DenisChenu
Because 000 it's not really a numeric question. Use a short text question for this kind of purpose.

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 following user(s) said Thank You: sergiovc
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 4 months ago #143588 by Joffm
Hi, sergiovc,
a similar question and answer is here:
www.limesurvey.org/de/foren/can-i-do-thi...-characters-in-input

Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: sergiovc
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose