DEV Community

loading...

Discussion on: There's only one way to validate an email address

Collapse
matthewbdaly profile image
Matthew Daly

I agree that you shouldn't use a regex, but PHP in particular has the filter_var() function, which is a far better option. There are a few edge cases that are validated incorrectly, but it's generally fairly reliable.

However, sending an activation email is probably prudent in most cases since just because an email address is valid doesn't mean it actually exists.

Collapse
ferricoxide profile image
Thomas H Jones II

However, sending an activation email is probably prudent in most cases since just because an email address is valid doesn't mean it actually exists.

Or is owned by the person submitting the address… :p

Collapse
jerodsanto profile image
Forem Open with the Forem app