You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor: extract shared email validation to packages/lib/src/validators #840
The email validation regex is duplicated verbatim in 3 files across 3 apps. A fourth contact route uses Zod's .email() validator instead. There is no shared email validation utility.
packages/lib/src/validators/index.ts already exports ID validators
apps/web/src/app/api/contact/route.ts uses Zod .email() — consider standardizing on this
Recommended Fix
Add isValidEmail() to packages/lib/src/validators/ and replace all inline regex usages. Include RFC 5321 length check (254 chars) in the shared function.
Risk
Low — maintenance drift. If the regex needs updating again, 3 files must be changed in sync.
Last reviewed: 2026-04-08 — identified during ReDoS triage (CodeQL #102, #103, #124)
Activity
2witstudios commentedon Apr 8, 2026
Closing — minimal remaining debt / low risk.