Welcome, Guest
Username: Password: Remember me

TOPIC: HELP REQUEST. Validation syntaxis (donation available).

HELP REQUEST. Validation syntaxis (donation available). 10 months 1 week ago #101691

Hi there

I work at an univerversity and I'm creating a survey for students where they have to enter their college registration ID, so I need a validation syntaxis for it.

The ID is composed of a 11 characters, only the 9th character can go from 0-9 or a K, and all the rest characters go from 0-9.

Examples:
15255806K01
15853966703
23654876K13
11345679212

Thanks in advance.

PD: Donation will be made through paypal for the first working syntax.
Last Edit: 10 months 1 week ago by jasepulveda.
The administrator has disabled public write access.

HELP REQUEST. Validation syntaxis (donation available). 10 months 1 week ago #101744

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4207
  • Thank you received: 791
  • Karma: 360
Assuming the "K" must be uppercase, use this as the question validation equation in the advanced settings:

regexMatch('/^\d{8}[\d|K]\d{2}$/', this)
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

HELP REQUEST. Validation syntaxis (donation available). 10 months 1 week ago #101748

Hi there, Thanks for your answer. Just tried but it didn't work. I tried with only numbers and with the "K" variant but neither of them seems to work.

I dont knot if I missed something else, you can check the test here:
http://observatoriocip.ufro.cl/encuestas/index.php?sid=67243&lang=es

Thanks in advance.
The administrator has disabled public write access.

HELP REQUEST. Validation syntaxis (donation available). 10 months 1 week ago #101749

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4207
  • Thank you received: 791
  • Karma: 360
Working survey attached.

File Attachment:

File Name: limesurvey_survey_9139781.lss
File Size: 13 KB
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 7 months 2 weeks ago by tpartner.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.113 seconds
Donation Image