Help for Regular expression code

validate a form field for a specific range of gift card numbers.

Overview

The regular expression was limited to a fixed range and needed to include new sequential numbers.
Update the regular expression pattern to match the new number range by specifying the exact digits required.

Answered
ChronoForms v6
gabi gabi 02 Jul, 2022
I am using Regular expression to validate a field in my form.
/^BLDCT-000[1-5]$/

Means you have to enter one of 5 strings in the field:
BLDCT-0001
BLDCT-0002
BLDCT-0003
BLDCT-0004
BLDCT-0005

Now I want to use and validate other numbers, but I have no idea how to change the code:
New strings/numbers are:
BLDCT-0006
BLDCT-0007
BLDCT-0008
BLDCT-0009
BLDCT-0010

Can someone please help me get this working if possible.
How should the new code look like?
Co Colnem 03 Jul, 2022
Hi

Don't use a Text Field with validate expression. Use a dropdown field with list of your values.
gabi gabi 04 Jul, 2022
Would be easier, I agree, but it is about a gift card number and I don't want to deliver informations about the number.
Thanks for answer anyway.
gabi gabi 04 Jul, 2022
Thank you very much for your help.
Got it working like this:

/^BLDCT-000[6-9]|BLDCT-001[0]$/
This topic is locked and no more replies can be posted.