Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ Email validation

Posted by: ezzo Jun 26 2019, 11:40 AM

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

Posted by: Christian J Jun 26 2019, 12:55 PM

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.

Posted by: pandy Jun 26 2019, 01:20 PM

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.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)