Xverify has an easy to set up Java Script feature to better protect your data and quickly validate your emails. Our syntax check takes that a step further by also ensuring that the username is in the right format for the domain.
For example, Gmail doesn’t allow users to use underscores, so our syntax check would not approve a Gmail account with an underscore.
It adds an additional layer of security to your site, by doing this, you can immediately start sending out emails without worrying about deliverability issues.
Java Script email validation works by validating email addresses in real-time, right on your webpage. A basic syntax check confirms that the email is inserted in the right format, confirming that the email has a username, an @ symbol and a domain.
The code seems to work, but I'm interested in hearing how it could be improved.
I'll include the code below, but you can run/fork it on Codepen.
The script has a catalog of almost all the common validation types built-in.