TheBigRoomXXL@leminal.space to Programmer Humor@programming.devEnglish · 13 hours agoEveryone knows what an email address is, right? (Quiz)e-mail.wtfexternal-linkmessage-square88fedilinkarrow-up1550arrow-down15
arrow-up1545arrow-down1external-linkEveryone knows what an email address is, right? (Quiz)e-mail.wtfTheBigRoomXXL@leminal.space to Programmer Humor@programming.devEnglish · 13 hours agomessage-square88fedilink
minus-squareTomasEkeli@programming.devlinkfedilinkarrow-up19·4 hours agoI 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.
minus-squareChaoticNeutralCzech@feddit.orglinkfedilinkEnglisharrow-up5·3 hours agoWhat kind of “light validation”? I’m guessing a .*@.* regex match.
minus-squareTomasEkeli@programming.devlinkfedilinkarrow-up8·edit-23 hours agoAlmost 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.
minus-squareGreenKnight23@lemmy.worldlinkfedilinkarrow-up2·2 hours agoI see you accept lemmy handles.
minus-squareTomasEkeli@programming.devlinkfedilinkarrow-up3·2 hours agoif i can email them and the user gets it - fine by me
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.
What kind of “light validation”? I’m guessing a
.*@.*
regex match.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.
I see you accept lemmy handles.
if i can email them and the user gets it - fine by me
@
matches