Home > Manual Testing > E-mail address validation

E-mail address validation

We will discus how to validate email field,
given below,
E-Mail Address = “A@b.c”;                — Valid
E-Mail Address = “A@b.cnet”;         — Invalid
E-Mail Address = “A@b.c_”;             — Invalid
E-Mail Address = “A@bcnn”;            — Invalid
E-Mail Address = “Ab.cnn”;               — Invalid
E-Mail Address = “A@bc”;                  — Invalid
E-Mail Address = “A@bat@.cnn”;   — Invalid
E-Mail Address = “A@bat/.com”;    — Invalid

conditions are,

  1. Must not be too short and too long
  2. Only one @ in email address
  3. Only one period ‘.’ or two periods in email
  4. No more than 3 characters after the final period (reverse find is 0 based not 1 based) com/ org/net/mil/gov/co.in/co.uk and etc
  5. Should not have an underscrode after @
  6. Allowed characters 0-9 A-Z _ . before @

Example E-Mail is thiyagarajannv@yahoo.com

I have devided Email ID in 4 parts in above email id,

  1. In first part we have to check invalid condition input spaces, Left blank, use special character, symbols etc before email in @.
  2. In Second part we have to check invalid condition input other specail character [!#$%^&*()_-:;”‘?/|\) at the place of @. left thisfield as blank. input spaces.etc
  3. In third part we have to check invalid invalid domain.
  4. In fourth part we have to check only valid suffix(.com,.co.in,.edu,.info,.org,.in etc)

very time EmailID should be in well manner.

like thiyagarajannv@yahoo.com and etc.

Advertisements
  1. August 7, 2009 at 3:50 pm

    Hi Thiyagarajan,

    According to the 3rd point mentioning:
    ” Only one period ‘.’ or two periods in email “,
    there is an email address for Nasa quest website as
    “quest-info@mail.arc.nasa.gov” as well as “kids-ask-nasa@mail.arc.nasa.gov” which are having more than one or two periods in the email address.

    and

    According to the 4th point,
    “No more than 3 characters after the final period (reverse find is 0 based not 1 based) com/ org/net/mil/gov/co.in/co.uk and etc”

    there are Museum Domain Management Association and only allow museums to register in the “.museum” TLD.
    .museum
    .travel.aero

  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: