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

Mail starting with apostrophe should be invalid #228

Open
janbarasek opened this issue Jul 20, 2020 · 2 comments
Open

Mail starting with apostrophe should be invalid #228

janbarasek opened this issue Jul 20, 2020 · 2 comments

Comments

@janbarasek
Copy link
Contributor

Version: v3.1.2

Bug Description

Input Validators::isEmail("'jan@barasek.com") return true, but I think it is not valid address, because it starting with apostrophe.

Expected Behavior

Addresses starting or ending with special characters should be detected as invalid.

I'm not sure how to elegantly implement this into the current regular expression, so I'm starting an issue.

Thanks!

@dg
Copy link
Member

dg commented Jul 20, 2020

but I think it is not valid address

why?

@janbarasek
Copy link
Contributor Author

Because I've been processing data files with hundreds of thousands of addresses in the last week, and this case looks like an error.

I think the function could contain a second parameter that turns on strict mode, which filters out some special cases that are potentially an error. It also solves cases where the user copies his e-mail from somewhere, for example to a form.

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