close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

email format not being accepted

Thread began 5/20/2015 12:31 pm by MagsW | Last modified 5/22/2015 11:05 am by Ray Borduin | 752 views | 5 replies |

MagsW

email format not being accepted

Someone is trying to register on our client's site via the standard SecurityAssist registration form but they want to use an email address with one of the new domain types - it has a .solutions suffix instead of .com or .co.uk This isn't being accepted as a valid email address. How do I allow this email address format in the email field validation?

Sign in to reply to this post

Ray BorduinWebAssist

Open the file: wavt_scripts_php.php included on your page.

Then find the line:
$knownDomsPat = "/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum|cat|\w{2,2})$/";

and update it to:
$knownDomsPat = "/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum|cat|solutions|\w{2,2})$/";

Sign in to reply to this post

MagsW

That's great, thanks!

Sign in to reply to this post

MagsW

Hi Ray, sorry, I thought it was fixed but it's not - the forms on the site still won't accept the .solutions email format. Could you take a look for me? FTP details in PM section. Don't know if it's any help but I also added .guru to the list and that works fine - I'm wondering if there's a max number of characters allowed?

Sign in to reply to this post

Ray BorduinWebAssist

I see... yes that just fixed server validation. The client validation also has issues.

The solution is to either update the pattern attribute of the email field. It is currently set to:
pattern="[^@]+@[^@]+\.[a-zA-Z]{2,6}"

that only allows 2-6 characters after the last ".". You could change it to:
pattern="[^@]+@[^@]+\.[a-zA-Z]{2,10}"

That would allow up to 10.

An even better solution would be to change it from type="text" to type="email" and remove the pattern attribute entirely.

Sign in to reply to this post

MagsW

Hi Ray, I went through every form on the site, changed the email fields to type="email" and removed the pattern and it's all working perfectly now thanks! It may be worth updating this in future releases of Data Bridge/Form Toolkit as it currently inserts email form fields as text with a pattern, and as there are now so many additional TLDs out there this is likely to be an issue for more and more people. Thanks for your help!

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...