Email validation fails for Country Code Top-Level Domains such as .co.uk
Closed this issue · 8 comments
ProNotion commented
Currently, validation is failing for me@example.co.uk but passing for me@example.com.
I tried a test against the current regex and it does not match the format. THe following regex should:
^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$
Source: https://regexr.com/2rhq7
mattkingshott commented
Thanks for raising this. Are you using v8?
ProNotion commented
Yes, I am
mattkingshott commented
Okay. I'm looking into this now...
mattkingshott commented
Fixed in v8.1.0
ProNotion commented
Wow, that was quick! I just created a local Fork to have a go myself - is this available for use now?
mattkingshott commented
Yep. Available on NPM.
ProNotion commented
Great stuff - thanks! Really like this package so far.
mattkingshott commented
No worries. Glad you like it :)