Welcome, Guest
Username: Password: Remember me

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

HELP REQUEST. Validation syntaxis (donation available). 11 months 1 day 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: 11 months 1 day ago by jasepulveda.
The administrator has disabled public write access.

HELP REQUEST. Validation syntaxis (donation available). 11 months 15 hours ago #101744

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4264
  • Thank you received: 801
  • Karma: 368
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). 11 months 15 hours 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). 11 months 14 hours ago #101749

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4264
  • Thank you received: 801
  • Karma: 368
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: 8 months 1 week ago by tpartner.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.106 seconds
Donation Image