|
|
|
|
|
by boulos
773 days ago
|
|
At the very least, I assume .+ at the start is a better choice. The RFC says: addr-spec = local-part "@" domain ; global address
atom = 1*<any CHAR except specials, SPACE and CTLs>
word = atom / quoted-string
so I think the bit in front of the @ has to be non-empty. |
|
Otherwise we can start saying not just not empty, it also needs no other @s etc. and before you know it we're rivalling the actually correct attempt up-thread. If you just want to catch typos, encourage entering real address (not just a space or full stop to fill mandatory field) then any basic thing is something, a compromise between legibility and how much it'll catch, we know there's a tonne of (mainly adversarial) bad input it'll miss, that's fine.