TheBigRoomXXL@leminal.space to Programmer Humor@programming.devEnglish · 5 months agoEveryone knows what an email address is, right? (Quiz)e-mail.wtfexternal-linkmessage-square31linkfedilinkarrow-up17arrow-down10
arrow-up17arrow-down1external-linkEveryone knows what an email address is, right? (Quiz)e-mail.wtfTheBigRoomXXL@leminal.space to Programmer Humor@programming.devEnglish · 5 months agomessage-square31linkfedilink
minus-squareTomasEkeli@programming.devlinkfedilinkarrow-up0·5 months 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-up0·5 months agoWhat kind of “light validation”? I’m guessing a .*@.* regex match.
minus-squareTomasEkeli@programming.devlinkfedilinkarrow-up1·edit-25 months 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-up0·5 months agoI see you accept lemmy handles.
minus-squareTomasEkeli@programming.devlinkfedilinkarrow-up1·5 months 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