DEV Community

Discussion on: Back to basics: Naming

Collapse
 
val_baca profile image
Valentin Baca • Edited

prereq question: Is 'email' an actual email or is it an email address?

Calling an 'email address' 'an email' could lead to confusion when you get to actually sending emails.

I'd prefer function isValidEmailAddress(str)

You also probably shouldn't be checking if their email address is valid. Just send the email.

hackernoon.com/the-100-correct-way...

Collapse
 
mlapierre profile image
Mark Lapierre

I think this is the only valid answer so far. ;)

Seriously though, all the rest ignore the fact that validation is being performed on an email address, not an email. The order of the words doesn't matter much if they're misleading words.

And yup, even an email address with a valid format can still be wrong. I get spam all the time because people keep mistyping their email address. It drives me nuts.

So if you do anything at all, send an activation email.