this post was submitted on 09 Feb 2024
93 points (89.1% liked)

Programming

17424 readers
88 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] ono@lemmy.ca 29 points 9 months ago* (last edited 9 months ago) (15 children)

By the way, please don’t write regex to try to validate email addresses. Seriously.

Amen.

There are libraries for that; some of them are even good.

Spoiler alert: Few of them are good, and those few are so simple that you might as well not use a library.

The only way to correctly validate an email address is to send a message to it, and verify that it arrived.

[–] Jesus_666@feddit.de 33 points 9 months ago (11 children)

You can use a regex to do basic validation. That regex is .+@.+. Anything beyond that is a waste of time.

[–] hansl@lemmy.world -4 points 9 months ago (6 children)

There are also cases where you want to have a disallow list of known bad email providers. That’s also part of the parsing and validating.

[–] pkill@programming.dev 9 points 9 months ago* (last edited 9 months ago) (1 children)

fuck any website that requires an account to just READ it's stupid content and at the same time blocks guerrillamail/10minutemail (looking at you, Glassdoor,I don't want to get fucking spam just so that I can check approximate salary in a company)

[–] hansl@lemmy.world 3 points 9 months ago

Sounds like your gripe is with people requiring accounts for reading public content, and not with preventing usage of automated email creation and trying to limit bots on your website.

load more comments (4 replies)
load more comments (8 replies)
load more comments (11 replies)