TomasEkeli

joined 1 year ago
[–] TomasEkeli@programming.dev 1 points 9 minutes ago

Would pass first validation, but fail when we try to send an email.

Successfully failed.

[–] TomasEkeli@programming.dev 6 points 5 hours ago

if i can email them and the user gets it - fine by me

[–] TomasEkeli@programming.dev 2 points 6 hours ago

This is the way.

[–] TomasEkeli@programming.dev 9 points 6 hours ago* (last edited 6 hours ago) (4 children)

Almost correct. ^.+@.+$

Too hard to validate properly to be worth it. Even if it is technically valid that's insufficient. It must also work, and the easiest way to test that is to use it and verify that the user got what we sent.

[–] TomasEkeli@programming.dev 26 points 7 hours ago (7 children)

I don't validate emails, I test them.

That's your email? OK, what did we send it? if we couldn't send to it or the user can't read it there's no reason to accept it.

OK, maybe I do some light validation first, but I don't trust the email address just because it's email-address-shaped.