Closed gfarrell closed 8 years ago
I would argue this has to at least look for a TLD as you're not going to be resolving dns without one for any valid email today.
to calrify: the .com .net .astronaut <-- being the TLD
But if you look at the spec, a TLD isn't required. Could be an IP address. Furthermore, given the possibility of using comments, any regex you write will basically be either monstrous or too restrictive.
@rhys-vdw any comments on this?
you're not going to be resolving dns without one for any valid email today.
While that's true, checkit actually prevented people from signing up to one of my apps when the new longer TLDs came out.
@gfarrell I agree. No reason to restrict the email unnecessarily.
See Wikipedia. The allowed characters in the
local-part
of email addresses is a large set:There's no really sane way to match email addresses except with
/^(.+)@(.+)$/
, so that's what this PR does (NB: even whitespace is allowed).Closes #60