jquense / yup

Dead simple Object schema validation
MIT License
22.72k stars 925 forks source link

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

Closed cookieMonsterDev closed 3 months ago

cookieMonsterDev commented 4 months ago

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

This PR resolves this issue.

jquense commented 4 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