• pyre@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    2 hours ago

    nice. though valid but obsolete is not a thing… if it’s obsolete it’s invalid.

  • codapine@lemmy.zip
    link
    fedilink
    arrow-up
    4
    ·
    3 hours ago

    Also as the registrant of one of those new fancy TLDs, much like the owner of this website (email.wtf), their own email addresses will fail those stupid email validation checks that only believe in example@example.[com|net|org]

    Shitty websites will fail “example@email.wtf”, guaranteed - despite it being 100% valid AND potentially live.

    Source - I have a “.family” domain for my email server. Totally functional, but some shitty websites refuse to believe it.

  • isaacd@lemmy.world
    link
    fedilink
    arrow-up
    18
    ·
    7 hours ago

    Let us recite the email validator’s oath:

    If it has something before the @, something between the @ and the ., and something after the ., it’s valid enough.

  • rumba@lemmy.zip
    link
    fedilink
    English
    arrow-up
    14
    ·
    7 hours ago

    I lost it at the fork bomb. I mean I hit valid because there was no way it was on the and not valid, but there’s no way i’d have expected that. after that I just kept guessing the most stupid answer and did pretty well

  • ikidd@lemmy.world
    link
    fedilink
    English
    arrow-up
    20
    ·
    9 hours ago

    I gave up when I got like 5 wrong. I’ve ran mail servers for decades, most of the invalid “valids” would get rejected by any mailservers I’ve administered.

  • marzhall@lemmy.world
    link
    fedilink
    arrow-up
    22
    ·
    10 hours ago

    I scored 16/21 on https://e-mail.wtf/ and all I got was this lousy text to share on social media.

    Damn, and here I thought I had this locked down because I was salty that so many places struggle with + in the email addy. But my god, there’s comments?

  • TomasEkeli@programming.dev
    link
    fedilink
    arrow-up
    28
    ·
    11 hours ago

    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.

    • who@feddit.org
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      2 hours ago

      I don’t validate emails, I test them.

      Hooray! You get a gold star.

      OK, maybe I do some light validation first,

      I hope your “validation” does nothing more than show a warning that the user is allowed to ignore.

      I have seen too many systems built by people who think they know what’s valid or not before and after the @ sign*, and they are almost always dead wrong. In the worst cases, such systems accept an unusual-looking address and claim to send the expected verification message, but never actually send it. Of course, these systems won’t work for some people, and since none of their online docs or support staff know why, those people will be locked out of using the system and funneled into bottomless pit of misery if they try. Please don’t build broken garbage like this.

      *Fun fact: Not so terribly long ago, even the @ sign didn’t have to be present. Some email addresses were bang paths. I’m not sure if any of these are still in use, but it wouldn’t shock me to learn that they are.

    • tyler@programming.dev
      link
      fedilink
      arrow-up
      16
      ·
      12 hours ago

      You shouldn’t be validating emails yourself anyway. Use a library or check for only the @ and then send an email confirmation.

      • who@feddit.org
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        3 hours ago

        Use a library

        Please, no. If someone wrote email address “validation” complex enough to warrant a library, then their code is almost certainly wrong.

        or check for only the @ and then send an email confirmation.

        Yes. Do that.

        If your boss demands a more detailed check at input time, then make it display warnings, not errors, and continue to the confirmation sending step if the user chooses to ignore the warning.

      • zurohki@aussie.zone
        link
        fedilink
        English
        arrow-up
        9
        ·
        10 hours ago

        Even if it’s a completely valid address and the domain exists, they still might’ve fat fingered the username part. Going to extreme lengths to validate email addresses is pointless, you still have to send an email to it anyway.