DEV Community

loading...

Discussion on: Back to basics: Naming

Collapse
luqezman profile image
Lucas Silva

isEmail is the best approach :) :)

verb + keyword

isValidEmail is redundant. Imagine the following scenario: A string can be a email, but invalid, so, if is invalid, is not an email. So "isEmail" is very good naming.

github.com/typestack/class-validator