Help - Search - Members - Calendar
Full Version: Email validation
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
ezzo
Hi eveyone, Ive tried ..... and epically failed in my task, so Im hoping someone here can help.

I have a registraion form for my website. When people enter their emails addresses about 2% enter a typo in the TLD such as the following:

Jobbloggs@outlook.cim (instead of .com)
janbloggs@motorhomes.co.ik (instead of .co.uk)
someone@gamil.com (instead of gmail)

Id like a message to appear before they click the submit button to warn them that their email extension looks wrong.

Can anyone help please?
Thanks
Ezzo
Christian J
You could make a list of TLD typos, but that might become a very long list. Or you could make a shorter list of common valid TLDs (and common domains like gmail), and create a warning for everything else.

Of course none of the above will protect users from entering the wrong name before the @-character. Another way to prevent typos might be to use easily viewable form fields (not too small or too large font size, good color contrast). Also, if you send out a confirmation email right away the user may have a second glance at the form confirmation page if no email shows up.
pandy
There are ways to check if an email address is valid, i.e. if it exists. I know that because some sites do that. cool.gif
Alas I don't know exactly HOW they do it, but I suspect some hocus pocus with MX records.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.