fabian-hiller / valibot

The modular and type safe schema library for validating structural data 🤖
https://valibot.dev
MIT License
5.88k stars 181 forks source link

Valid emails being flagged as invalid #730

Closed ray73864 closed 1 month ago

ray73864 commented 1 month ago

There are quite a few valid email addresses according to the standard that this flags as invalid.

A big one that I use quite a fair bit is the 'tag' feature email+tag@example.com

Gmail for instance will send the email to the correct email address, in this case 'email@example.com' and label it with the 'tag' label.

So for instance, if you are subscribed to a newsletter, you could do 'fred+newsletter@gmail.com' and it will be auto-labelled with the label 'newsletter'.

It also fails with mailhost style routing, eg mailhost!test@example.com

fabian-hiller commented 1 month ago

Emails like email+tag@example.com should work. Take a look at this playground.

Our email action is intentionally limited to "normal" email addresses. See #204 for more details.