Alex Rivera | Logout

list of email addresses that can be used to test a javascript validation script

Asked 2008-11-18T00:01:50.223
22

Does anyone have a list of email addresses that I can use to test my JS address validation script? I'm looking for as complete of a list as is reasonable to test the most common edge cases, if not all cases.

Edit
Report

1 Answer

0

The domain part (after the last @), is a series of string labels divided by a dot.

Each label is a string of 1 to 63 octets consisting of A-Z, a-z 0-9 or hyphen (-)

The maximum size of the domain is 255 octets.

To be compatible with arpanet, each label must start with a letter and end with a letter or digit but some TLD:s now allows an all numeric domain, like 0.nu

Note that the TLD is allowed to be 63 octets. Very many scrips wrongly restricts it to 2-3 octets making domain.name invalid.

Example?

abcdefghijklmnopqrstuvwxyz.ABCDEFGHIJKLMNOPQRSTUVWXYZ.!#$%&'+-/=.?^`{|}~@ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-0123456789.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.A.B.C.D.E.F.G.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.0.1.2.3.4.5.6.7.8.9.a-z.A-Z.0-9.a0.b1.c2.d3.e4.f5.g6.h7.i8.j9.K0.L1.M2.N3.O.domain.name

(and no, it isn't registered)

Update: With IDNA almost everything is possible:

  • punnycode@XN--0ZWM56D.XN--HGBK6AJ7F53BBA
  • idna_in_clear(?)_text@例子.测试.مثال.آزمایشی

See also:

https://stackoverflow.com/questions/3232/how-far-should-one-take-e-mail-address-validation

http://www.leshazlewood.com/?p=5

Update: Bobince suggested to test for a dot in the domain name.

Summary: Only test for @ and a dot in the domain part and then send a confirmation email.

Here is an example that test for @ and dot:

  • There must be at least one @
  • There must be at least one char in the local part ( pos > 0)
  • There must be at least one dot in the domain part
  • The domain part must be at lest 4 characters

Here is a simple one:

function isEmail(
answered 2008-11-18T02:42:34.080

Your Answer