Skip to content

fix(core): trim whitespace in the email validator - #351

Open
kevin9327 wants to merge 1 commit into
vercel-labs:mainfrom
kevin9327:fix/email-validator-trim
Open

kevin9327 wants to merge 1 commit into
vercel-labs:mainfrom
kevin9327:fix/email-validator-trim

Conversation

@kevin9327

Copy link
Copy Markdown
Contributor

Summary

required() trims the value, but email() did not. A pasted "test@example.com " failed the email check even though the address is valid. Trim before the regex so surrounding whitespace does not fail a good email.

Testing

  • pnpm exec vitest run packages/core/src/validation.test.ts -t email
  • pnpm test

AI-assisted (Grok)

required() already trims, but email() did not. A pasted
"test@example.com " failed the email check even though the address
is valid. Trim before the regex, matching the required check.
@vercel

vercel Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

@kevin9327 is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant