Validate email address using JavaScript

An email address is a string separated into two parts by '@' symbol. A "personal-part" and a domain-name, that is personal-part@domain-name. The length of the personal-part may be up to 64 characters long and domain-name may be up to 253 characters . The personal-part contains the following ASCII characters.

  1. Uppercase: (A-Z) and lowercase (a-z) English letters.
  2. Digits: (0-9).
  3. Characters: ! # $ % & ' * + - / = ? ^ _ ` { | } ~
  4. Character: . ( period, dot or fullstop) provided that it is not the first or last character and it will not come one after the other.

The domain name [for example: com, org, net, in, us, info] part contains letters, digits, hyphens, and dots.

Example of valid email id

Keep in mind that one should not rely only upon JavaScript email validation because JavaScript can easily be disabled.

validate email address using javascript/jquery

Regular Expression

A regular expression is an object that describes a pattern of characters.

The following JavaScript shows how to validate an email address using Regular Expression .

Full Source | JavaScript
 (C) 2022    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.
SiteMap  | Terms  | About