caneara/iodine

Email validation fails for Country Code Top-Level Domains such as .co.uk

Closed this issue · 8 comments

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

Thanks for raising this. Are you using v8?

Yes, I am

Okay. I'm looking into this now...

Fixed in v8.1.0

Wow, that was quick! I just created a local Fork to have a go myself - is this available for use now?

Yep. Available on NPM.

Great stuff - thanks! Really like this package so far.

No worries. Glad you like it :)