Closed jcobhams closed 2 years ago
@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 I am on Angular
And using the below regex:
'^[a-z0-9]+([._-]?[a-z0-9]+)+@[a-z0-9]+([._-]?[a-z0-9]+)+\\.[a-z]{2,3}$'
But its not fulfilling my requirement, my requirement is below:
saa5@me-d_d_u.co
please anyone tell me, why this regex is not working for my above mentioned case.
Regards Babar Ali Shah
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/amd64