manishsaraan / email-validator

email syntax validator npm module. fast and pretty robust
The Unlicense
436 stars 80 forks source link

Provide concise error messages #52

Closed axelrindle closed 3 years ago

axelrindle commented 4 years ago

What about returning an error message to precisely indicate what is wrong with the given value instead of just returning true or false?

manishsaraan commented 4 years ago

@axelrindle Current behaviour of this library is verify if given email is valid or not. Could you give some example what response you expecting from the response

axelrindle commented 4 years ago

For example: If the email is too long, a message like the following could be returned:

The given email exceeds the maximum length of 256 characters!

Or just:

The given email is too long!