30 Oct 2020
At work today I had an interesting problem to solve. I needed to validate a phone number field with a regex and without caring about the format of the phone number.
The client just wanted there to be at least 6 numbers in the phone number field. So on our stand up zoom call I asked for help and my boss came up with this regex which works a treat.
I've shared it here in case anyone else is looking for something similar.
It's as simple as that. I was then able to use it in Umbraco Forms on phone number text fields.
If you want to increase the amount of numbers you are looking for, just add another *\d.