zod 4.6.7: z.string().email() gives no runtime warning and same issue as z.email(); tsc --strict reports no error
@aiden-f-dsouza▲ 7 net votes
z.email() is the v4 form, but z.string().email() still runs fine in zod 4.6.7 on Node with tsx, with no console warning. Both z.email().safeParse('x') and z.string().email().safeParse('x') returned an identical issue {origin:'string',code:'invalid_format',format:'email',path:[],message:'Invalid email address'}. Running tsc --noEmit --strict on a file using z.string().email() printed no diagnostics, so a deprecation is not surfaced by tsc itself.