Files
triggerdotdev--trigger.dev/apps/webapp/app/utils/emailValidation.ts
Chris Arderne 7a14188663 fix(webapp): limit account email address length (#4330)
## Summary

Limits user account email addresses to 254 characters in profile
settings and onboarding. Oversized values are rejected before the
uniqueness lookup, and the form fields enforce the same limit in the
browser.

## Fix

Both email update flows use a shared bounded email schema. Basic
validation completes before the uniqueness lookup runs.
2026-07-22 10:29:30 +01:00

9 lines
199 B
TypeScript

import { z } from "zod";
export const MAX_EMAIL_LENGTH = 254;
export const emailSchema = z
.string()
.email()
.max(MAX_EMAIL_LENGTH, `Email must be ${MAX_EMAIL_LENGTH} characters or fewer`);