HTML5 Form validation is another type of client side validation . However, it is important to be aware of the following file types that, if allowed, could result in security vulnerabilities: The format of email addresses is defined by RFC 5321, and is far more complicated than most people realise. Just copy and paste the email regex below for the language of your choice. Feeling hardcore (or crazy, you decide)? To validate email using jQuery, use the regex pattern. We can also validate an email using pattern attribute in template-driven forms. The domain part contains only letters, numbers, hyphens (. The input value is automatically validated to ensure it is a properly formatted e-mail address. As an example, the following are all considered to be valid email addresses: Properly parsing email addresses for validity with regular expressions is very complicated, although there are a number of publicly available documents on regex. Before HTML5 was released, web developers had to make use of JavaScript functions or 3rd-party libraries to filter out unwanted emails. For example