How to Validate International Phone Numbers?

0
I tried validating international phone numbers in two ways, but both methods incorrectly show a false validation error even when I input pure digits (4 to 14 characters long): Using a Microflow In a sub-microflow, I used a Decision with isMatch($Phone, '^\\d{4,14}$'). If false, it triggers a validation feedback. The main microflow calls this sub-microflow. (See attached images for details.) Directly on the Input Field Instead of using a microflow, I added validation directly to the Text Box in the Edit page: Custom Validation Rule: isMatch($Phone, '^\\d{4,14}$'). Problem: In both cases, even when entering valid numbers (e.g., 13812345678), the system returns false. Sub-microflow:
asked
2 answers
1

You have an extra '\' in your regular expression, so you are escaping the digit match. Try this instead.

 

isMatch($Phone, '^\d{4,14}$')

 

I hope this helps. Good luck!

answered
1

Try without escaping the backslash:

\d{4,14}

Also take a look at some related marketplace content, like a Phone Number Validator

answered