• tyler@programming.dev
    link
    fedilink
    arrow-up
    19
    ·
    18 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
      4
      arrow-down
      1
      ·
      edit-2
      9 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
      11
      ·
      17 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.

      • psud@aussie.zone
        link
        fedilink
        English
        arrow-up
        1
        ·
        7 hours ago

        I seem to have annoyed an admin of an instance enough for them to subscribe my signup email to hundreds of dating profiles (presumably using a service that offers to harass someone for you)

        Many of them aren’t good at validating email

        One in ten has one email arrive, asking me to click a link to confirm

        9 in ten have 5 emails before I notice them:

        • Please click a link to confirm
        • You received a wink
        • You received a wink
        • You received 3 chat requests
        • You received a link

        So it’s important to not send emails beyond the validate one to unvalidated addresses, to perfect your service annoying or harassing this parties

        Also, use a disposable address for signing up to Lemmy