In Zod 3, format checks were methods on the string schema: z.string().email(), z.string().uuid(), z.string().url(). Zod 4 promotes each to a top-level function, z.email(), z.uuid(), z.url(), and deprecates the method form.
The motivation is bundle size and tree shaking: with the method chain, every format's implementation is reachable from the string schema, so importing Zod pulls in all of them. The top-level functions can be dropped by a bundler when unused.
The methods still work in Zod 4 and emit a deprecation warning in editors, so migration can be incremental. One behavioral change to check is that z.email() uses a stricter default pattern than Zod 3's, so inputs that previously passed can now fail. If a permissive check is required, pass a custom pattern, and note that z.uuid() validates the RFC variant bits where a looser check may be wanted for non-standard identifiers.