Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The domain part (after the last @), is a series of string labels divided by a dot.</p> <p>Each label is a string of 1 to 63 octets consisting of A-Z, a-z 0-9 or hyphen (-)</p> <p>The maximum size of the domain is 255 octets.</p> <p>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</p> <p>Note that the TLD is allowed to be 63 octets. Very many scrips wrongly restricts it to 2-3 octets making domain.name invalid.</p> <p>Example?</p> <p>abcdefghijklmnopqrstuvwxyz.ABCDEFGHIJKLMNOPQRSTUVWXYZ.!#$%&amp;'+-/=.?^`{|}~@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</p> <p>(and no, it isn't registered)</p> <p>Update: With IDNA almost <strong>everything</strong> is possible:</p> <ul> <li>punnycode@XN--0ZWM56D.XN--HGBK6AJ7F53BBA</li> <li>idna_in_clear(?)_text@例子.测试.مثال.آزمایشی</li> </ul> <p>See also: </p> <p><a href="https://stackoverflow.com/questions/3232/how-far-should-one-take-e-mail-address-validation">https://stackoverflow.com/questions/3232/how-far-should-one-take-e-mail-address-validation</a></p> <p><a href="http://www.leshazlewood.com/?p=5" rel="nofollow noreferrer">http://www.leshazlewood.com/?p=5</a></p> <p><strong>Update:</strong> Bobince suggested to test for a dot in the domain name.</p> <p><strong>Summary</strong>: Only test for @ and a dot in the domain part and then send a confirmation email.</p> <p>Here is an example that test for @ and dot:</p> <ul> <li>There must be at least one @</li> <li>There must be at least one char in the local part ( pos > 0)</li> <li>There must be at least one dot in the domain part</li> <li>The domain part must be at lest 4 characters</li> </ul> <p>Here is a simple one:</p> <pre><code>function isEmail(address) { var pos = address.lastIndexOf("@"); return pos &gt; 0 &amp;&amp; (address.lastIndexOf(".") &gt; pos) &amp;&amp; (address.length - pos &gt; 4); } </code></pre> <p>Or a function that returns the local and domain part in an object ( if you want to process it even further, for example convert it to punycode) </p> <pre><code>function isEmail(address) { var pos = address.lastIndexOf("@"); return pos &gt; 0 &amp;&amp; (address.lastIndexOf(".") &gt; pos) &amp;&amp; (address.length - pos &gt; 4) ? { local:address.substr(0,pos &lt; 0 ? 0 : pos), domain:address.substr(pos+1) }: false; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload