# Zod with TypeScript for Server-side Validation and End-to-End Types

DevFeed: [Zod with TypeScript for Server-side Validation and End-to-End Types](<https://devfeed.tech/articles/zod-with-typescript-for-server-side-validation-and-end-to-end-types-81478.md>)

Original publisher: [Read original article](<https://stack.convex.dev/typescript-zod-function-validation>)

Author: Stack

Published: 2023-12-15T03:00:02Z

Content type: tutorial

Language: en

Sources: [Stack](<https://devfeed.tech/sources/stack.md>)

Topics: [Data validation](<https://devfeed.tech/topics/data-validation.md>), [TypeScript](<https://devfeed.tech/topics/typescript.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [convex](<https://devfeed.tech/tags/convex.md>), [data](<https://devfeed.tech/tags/data.md>), [data-validation](<https://devfeed.tech/tags/data-validation.md>), [integration](<https://devfeed.tech/tags/integration.md>), [patterns](<https://devfeed.tech/tags/patterns.md>), [typescript](<https://devfeed.tech/tags/typescript.md>), [zod](<https://devfeed.tech/tags/zod.md>)

## AI overview

The article demonstrates using Zod with TypeScript to validate server function arguments and outputs in Convex. It explains how convex-helpers converts Zod schemas into Convex validators, supports more precise runtime checks, and provides end-to-end type safety. It also discusses limitations when validating stored data and ways to handle schema changes.

## Source excerpt

Use Zod with TypeScript for argument validation on your server functions allows you to both protect against invalid data, and define TypeScript types that propagate to your client. This can now be used as an alternative to the built-in argument validation on Convex.