jquense / yup

Dead simple Object schema validation
MIT License
22.93k stars 934 forks source link

fix(regex): update the email regex for more cases #2217

Closed cookieMonsterDev closed 6 months ago

cookieMonsterDev commented 6 months ago

The yup.string().email() works via regex but is does not cover cases like:

This PR resolves this issue.

jquense commented 6 months ago

Thanks for the PR but the current behavior is intentionally matching browser spec for email validation. You can read more about the reasons and justifications in the b1 issue and other issues