HELP REQUEST. Validation syntaxis (donation available).

More
3 years 7 months ago - 3 years 7 months ago #101691 by jasepulveda
jasepulveda created the topic: HELP REQUEST. Validation syntaxis (donation available).
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: 3 years 7 months ago by jasepulveda.

Please Log in to join the conversation.

More
3 years 7 months ago #101744 by tpartner
tpartner replied the topic: HELP REQUEST. Validation syntaxis (donation available).
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.

Please Log in to join the conversation.

More
3 years 7 months ago #101748 by jasepulveda
jasepulveda replied the topic: HELP REQUEST. Validation syntaxis (donation available).
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.

Please Log in to join the conversation.

More
3 years 7 months ago - 3 years 4 months ago #101749 by tpartner
tpartner replied the topic: HELP REQUEST. Validation syntaxis (donation available).
Working survey attached.

File Attachment:

File Name: limesurvey...9781.lss
File Size:13 KB

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
Last Edit: 3 years 4 months ago by tpartner.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now