Magical Phone Number element

User 2757927 Photo


Registered User
4 posts

When using a Magical Phone Number element (Format Phone US) I get the following error message "Please specify a valid phone number."

I am entering a valid number in the following format 111 222-3333 The form will accept 111 222-333 which is an invalid number.

Ideally, I would like for the user to have the ability to enter (111) 222-3333 or 111 222-3333

Any ideas?
User 122279 Photo


Senior Advisor
14,450 posts

You can select the international format if the US one doesn't work. But try the format 111 222 3333 (without the dash) first.

Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 187934 Photo


Senior Advisor
20,188 posts

Try a regular expression
/^\(?(\d{3})\)?[-. ]?(\d{3})[-. ]?(\d{4})$/
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.