close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

International number won't validate

Thread began 6/25/2020 10:22 am by Justin@AdventDesign | Last modified 7/10/2020 2:16 pm by Ray Borduin | 38 views | 6 replies |

Justin@AdventDesign

International number won't validate

I have the checkbox marked for allowing international numbers, but the page still doesn't seem to allow international numbers. When I enter '82-10-3376-3593' it reformats it to '82 (103) 376-3593', but won't allow it. Page attached.

Sign in to reply to this post

Ray BorduinWebAssist

Your date field has:

pattern="\(\d{3}\) \d{3}[\-]\d{4}"

but it looks like the pattern should be:

pattern="\d2 \(\d{3}\) \d{3}[\-]\d{4}"

Sign in to reply to this post
Did this help? Tips are appreciated...

Justin@AdventDesign

That makes sense, but it appears whether I do or do not check for allowing international numbers the pattern won't change. I'll try it manually.

Sign in to reply to this post

Ray BorduinWebAssist

Yes. That is the client validation. You would have to change that manually. The server validation is separate. You could remove the pattern attribute entirely and just use the server validation.

Sign in to reply to this post
Did this help? Tips are appreciated...

Justin@AdventDesign

Thanks Ray. That second to last set of numbers needs to be 3 or 4 digits, depending upon the country. As is it still wants to alter 82-10-3376-3593 to 82 (103) 376-3593. I can't seem to find a guide for how the pattern coding works. I tried changing \d2 \(\d{3}\) \d{3}[\-]\d{4} to \d2 \(\d{3}\) \d{4}[\-]\d{4}, but that doesn't do it. Where can I find more information on coding the pattern?

Sign in to reply to this post

Ray BorduinWebAssist

Remove the onblur code from the fields... That is what is doing the reformatting.

For a true international phone validation, try using:
^\+(?:[0-9] ?){6,14}[0-9]$

I found it here:
https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch04s03.html

For more examples google "International phone number regular expression"

Sign in to reply to this post
Did this help? Tips are appreciated...

Justin@AdventDesign

Thanks Ray. I actually came across some things like that but they looked so drastically different from what we had I thought it must be a different coding system or something. I'll give it a try.

I actually like the reformatting as it makes it consistent but I'm guessing that it may not be possible with such a variety of numbers dealing with international numbers.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...