Skip to Content Skip to Menu

Help with International Phone Numbers

  • tracye
  • tracye
  • OFFLINE
  • Posts: 1
  • Thanks: 0
  • Karma: 0
12 years 3 months ago #209789 by tracye
I am new at CB, I inherited a site that the designer left the client high and dry on support...I need a solution...it would be much appreciated if someone could help me.

The client needs for their users to be able to add International Phone numbers to their contact tabs. When they put the International number in and try and save the user profile, the following error message comes up "Phone Number: Not A Valid Input" and the profile cannot be saved with the phone number added.

I saw a thread about adding a string of code to the regex, I have no clue what that is, or where it is...if someone can tell me that, I would be very thankful! :)

Here is what was on another thread....


Please try the following regex.


/((?:\(?\b[0-9]{3}\)?[-. ]?[0-9]{3}[-. ]?[0-9]{4}\b)|(?:\+?\b[0-9]{2,3}[ ]?(?:[0-9]{2}[ ]?)?[0-9]{2,3}[ ]?[0-9]{4}\b))/



CB in some cases requires double escaping. If this is the case, please try the following (due to stripslashes).


/((?:\\(?\b[0-9]{3}\\)?[-. ]?[0-9]{3}[-. ]?[0-9]{4}\\b)|(?:\\+?\\b[0-9]{2,3}[ ]?(?:[0-9]{2}[ ]?)?[0-9]{2,3}[ ]?[0-9]{4}\\b))/

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum