Home > Java Script, Logic > Email validation in Javascript

Email validation in Javascript

Email Field Validation in Javascript :

  • Normally in an Registration Form we have a Email Field.To validate this simple field we may struggle more.
  • To avoid this here i put one simple example.
  • The main thing here is what is {2,3} at the end.I took long time to find out this…I don’t find in websites also.
  • I really very happy to tell this to everyone..

Example:

/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,3}$/

  • Here {2,3} is the character at this place should be 2-3 characters length.
  • It display an error message if we type one character or more than 3 character.


  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: