Also, I agree with Gaby -- emails do accept so many valid characters, including ones we've never thought would be acceptable.
This way you know that you are sending an email to a real, verified email address. Our Java Script email validation is easy to add verification to your web forms in a matter of minutes.
Lastly, here's code that I quickly modified for yours.
I'm sure there's a few more things you can do to improve the quality.
HTML One thing I know could be improved is where I repeat basically the same code twice to validate the characters in each section.
I am more interested in hearing if the way I've structured the function and sections could be done better, as the exercise for me was more about writing well-structured Java Script and getting familiar with some of the built-in functions than about writing a perfect validator (which is also the reason I didn't use Regex).
If the email address that was entered is invalid, an error message will appear.
Though doing bulk uploads of email is a great way to validate your email list, there is a more efficient way, Java Script email validation.
Java Script can prompt the user to correct the mistake before they enter your marketing funnel.
The script has a catalog of almost all the common validation types built-in.
The idea is to create a set of “validation descriptors” associated with each element in a form.