The only useful email validation is “can I get an MX from that” and “does it understand what I’m saying in that SMTP”. Anything else is someone that have too much free time.
The only useful email validation is “can I get an MX from that” and “does it understand what I’m saying in that SMTP”. Anything else is someone that have too much free time.
cashews_best_nut@lemmy.world 1 year ago
It’s easier to Google “email regex [language]” and copy the first result from stack overflow.
vithigar@lemmy.ca 1 year ago
Definitely a timesaver. Much faster to get incorrect email validation that way then to try building it yourself.
Archer@lemmy.world 1 year ago
Skip the building step and go straight to pulling your hair out over why it’s not working! Efficiency!
Katana314@lemmy.world 1 year ago
That probably lead to this exchange.
Stack Overflow is useful, but…it needs more than a little parsing for useful answers.
felbane@lemmy.world 1 year ago
I know (hope) you’re being facetious, because the objectively best way to do email validation is to send a fuckin email to the provided address.
AnAngryAlpaca@feddit.de 1 year ago
To be valid, the email just has to match [anything@anything]. ,🙃@localhost can be perfect legal if localhost supports utf8 in usernames.
kamenoko@sh.itjust.works 1 year ago
Or implement a validator from a known good library.