• codapine@lemmy.zip
    link
    fedilink
    arrow-up
    21
    ·
    1 day 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.

    • notarobot@lemmy.zip
      link
      fedilink
      arrow-up
      1
      ·
      20 hours ago

      I’m not sure I blame the sites. The spec is so complex that it’s not even possible to know which regex to use

      • ulterno@programming.dev
        link
        fedilink
        English
        arrow-up
        0
        ·
        28 minutes ago

        I have a feeling, the ones codapine is stating, didn’t even care to half-read the spec and just went with what they knew from experience.
        Maybe they didn’t even know there was a spec.
        Maybe they asked ChatGPT for the regex.

      • bignose@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        6 hours ago

        The spec is so complex that it’s not even possible to know which regex to use

        Yes. Almost like a regex is not the correct tool to use, and instead they should use a well-tested library function to validate email addresses.

        • notarobot@lemmy.zip
          link
          fedilink
          arrow-up
          2
          ·
          18 hours ago

          That’s one very random place to find that. There are a lot of different one and there is no way we all just agree to use that one.

          Look art his site that shows a more complete and (in theory) official website. While also explaining that there is no regex that is perfect

          https://emailregex.com/

          (Compete regex for the lazy)

          (?:\[a-z0-9!#$%&'\*+/=?^\_\`{|}\~-]+(?:\\.\[a-z0-9!#$%&'\*+/=?^\_\`{|}\~-]+)\*|"(?:\[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\\\\[\x01-\x09\x0b\x0c\x0e-\x7f])\*")@(?:(?:\[a-z0-9]\(?:\[a-z0-9-]\*\[a-z0-9])?\\.)+\[a-z0-9]\(?:\[a-z0-9-]\*\[a-z0-9])?|\\\[(?:(?:25\[0-5]|2\[0-4]\[0-9]|\[01]?\[0-9]\[0-9]?)\\.){3}(?:25\[0-5]|2\[0-4]\[0-9]|\[01]?\[0-9]\[0-9]?|\[a-z0-9-]\*\[a-z0-9]:(?:\[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\\\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\\])
          
      • Appoxo@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        1
        ·
        22 hours ago

        Seems like a weird choice as the primary TLD.
        I’d switch it just to reduce the annoying typing hassle and to avoid misspelling.

        It’s already unusual if I say “My email is givenName@LastName.eu
        And that trips so many persons.
        First: I have my own domain
        Second: It’s not gmail, apple or a local provider
        Third: The TLD isnt .de or .com but .eu

    • BlushedPotatoPlayers@sopuli.xyz
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

      I have a spam collecting address @freemail.hu , the domain is live and working since 96, sometimes it’s not accepted, because it’s not Gmail I guess