Forums

Validate certain numbers

Corne Strydom 08 Feb, 2019
Good day,

Can you please help, I want to validate a 13 digit number, where the first two numbers can be between 0-9 and the the third number can be 0 or 1 and then the fourth number can be 0 to 9 and the fifth number can be 0 to 3 and the sixth number can be 0 to 9 and then lastly the 12th number can only be 8. The rest of the numbers can be any number.

Can please give me an idea of how to set it up.

Thanks

Corne
Corne Strydom 08 Feb, 2019
Thanks, for getting back to me. Can you please give me an idea of what the Regex will look like as I have no idea where to start.
healyhatman 08 Feb, 2019
I'm going to bed, you can start by looking at regexer or googling regex builder. Making regex patterns sucks and I'm bad at it but you'll get there eventually.
healyhatman 08 Feb, 2019
Do it on the backend in PHP the validate data action doesn't work with regex til the next update. Frontend works the syntax is here on the forums somewhere. But you will need the regex pattern first.
Corne Strydom 11 Feb, 2019
Thanks, I got it sorted, under the validations tab there is space for regular expression, and that worked for me.
healyhatman 11 Feb, 2019
That works on the frontend, not necessarily the backend.
This topic is locked and no more replies can be posted.