-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
[BUG] Some fake emails fails email validation regex #83
Comments
@jcobhams thank you for reporting 👍 , I've merged the fix for this issue and released it in 1.10.1, the fix will only generate names with valid characters, replacing with "_" otherwise, and includes a validation in tests to check that the email is valid to improve detection of this in the future. |
Thanks for the quick fix and prompt response @jaswdr |
Hi And using the below regex:
But its not fulfilling my requirement, my requirement is below:
please anyone tell me, why this regex is not working for my above mentioned case. Regards |
Describe the bug
When using
faker.Internet().Email()
, some generated fake emails fails email regex patterns.Some names like
"O\"Connell", "O\"Conner", "O\"Hara", "O\"Keefe", "O\"Kon"
found in here trips up a regex pattern for validating email addresses.Regex:
/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/g
To Reproduce
Expected behavior
That
faker.Internet().Email()
returns a semantically valid email address format.Screenshots
Desktop (please complete the following information):
go version
output: go version go1.17.6 darwin/amd64The text was updated successfully, but these errors were encountered: