Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect email validation #284

Open
rubanraj54 opened this issue Nov 30, 2020 · 1 comment
Open

Incorrect email validation #284

rubanraj54 opened this issue Nov 30, 2020 · 1 comment

Comments

@rubanraj54
Copy link

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

Could you please fix this?

@joshuagoran
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants