Email Validation in pure JavaScript | Validate email address

In email validation in javascript is a very important module while validating simple an HTML web form. In this web page I have learn all about how to validate an email address using pure JavaScript with examples :

Simple Email Validation in JavaScript – Step by Step

I can simple validation in javascript the email by the uses of Pure JS.

There are Two types of the Email validation regex in JS.

  • Basic Validation
  • Data Format Validation

javascript Form validation Source code
javascript Form validation Source code

There are lots of the criteria that required to be bellow to user validate or check the email id is valid or not such as:
How to validate email address in JavaScript?

  • first of all user email id must data string available the @ and . character
  • Email must be at least single character before as well as after the special character @.
  • Email must be at least 2 or more characters after the special character like as a . (dot).
  • Let’s display the best example to check or validate the email id field.
  • use a Digits (0-9).
  • also you can use a Characters like as a! # $ % & ‘ * + – / = ? ^ _ ` { | } ~ some special char.
  • using Uppercase (A-Z) as well as lowercase (a-z) niche related English letters.

JavaScript – Form Validation

here display Validate email address textbox using JavaScript source code

      js Form Validation -      
User Name
User EMail
User Zip Code
User Country

Example of valid email id

The domain name consists of

  1. use a hyphens
  2. use a dots
  3. use a letters
  4. use a digits

Example of invalid email id

  • [@ is not present]
  • [email protected] [ tld (Top Level domain) can not start with dot “.” ]
  • [ No character before @ ]
  • [email protected] [ “.b” is not a valid tld ]
  • [email protected] [ tld can not start with dot “.” ]
  • [email protected] [ an email should not be start with “.” ]
  • admininfo()* [ there the regular expression only allows character, digit, underscore, and dash ]
  • [email protected] [double dots are not allowed]

JavaScript email validation

To simple HTML Form with validate email address using a JavaScript source code, so you cna check the some condition for use a at least single “@” as well as “.” i.e. for [email protected] . so Let’s try the bellow some source code to validate email Id.

Please Eneter Your Email:

Data Format Validation

I hope you get an idea about email validation in javascript on button click.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment