simple-react-validator icon indicating copy to clipboard operation
simple-react-validator copied to clipboard

Incorrect email validation

Open rubanraj54 opened this issue 5 years ago • 1 comments

simple-react-validator accepts this email id pattern [email protected] as a valid one, but actually, it is wrong.

Could you please fix this?

rubanraj54 avatar Nov 30 '20 08:11 rubanraj54

I realize this is an old issue.


This request could be done with additional regex in the email validator. The current regex validates that the domain contains only A-Z, 0-9, . and - characters, but doesn't check for hyphens as the first/last character or for consecutive hyphens, both of which would be invalid domains.

However, maybe this was a conscious decision, as validating emails can be a slippery slope.

joshuagoran avatar Jun 07 '22 00:06 joshuagoran