Buy Now
Sign in

Validate certain numbers

Corne Strydom , February 08 2019, 12:09
C
Corne Strydom 8
February 08 2019, 12:09 #383715
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
healyhatman 8
February 08 2019, 12:18 #383716
You can do it with regex.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
C
Corne Strydom 8
February 08 2019, 12:26 #383718
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 8
February 08 2019, 12:28 #383719
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.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
C
Corne Strydom 8
February 08 2019, 12:28 #383720
Ok, thanks for the help.
healyhatman 8
February 08 2019, 12:36 #383721
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.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
healyhatman 8
February 08 2019, 12:37 #383722
Edited
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
C
Corne Strydom 8
February 08 2019, 12:39 #383723
Thanks, will try and sort it out.
C
Corne Strydom 8
February 11 2019, 06:30 #383800
Thanks, I got it sorted, under the validations tab there is space for regular expression, and that worked for me.
healyhatman 8
February 11 2019, 06:38 #383801
That works on the frontend, not necessarily the backend.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store