🌐
npm
npmjs.com › package › zod-prisma
zod-prisma - npm
January 26, 2022 - A Prisma generator that creates Zod schemas for all of your models. Latest version: 0.5.4, last published: 4 years ago. Start using zod-prisma in your project by running `npm i zod-prisma`. There are 5 other projects in the npm registry using ...
      » npm install zod-prisma
    
Published   Jan 26, 2022
Version   0.5.4
🌐
npm
npmjs.com › package › zod-prisma-types
zod-prisma-types - npm
January 24, 2026 - Generates zod schemas from Prisma models with advanced validation. Latest version: 3.3.11, last published: 5 months ago. Start using zod-prisma-types in your project by running `npm i zod-prisma-types`. There are 11 other projects in the npm ...
      » npm install zod-prisma-types
    
Published   Jan 24, 2026
Version   3.3.11
People also ask

What is zod-prisma-types?
Generates zod schemas from Prisma models with advanced validation
🌐
socket.dev
socket.dev › npm › package › zod-prisma-types
zod-prisma-types - npm Package Security Analysis - Socket.dev
Is zod-prisma-types popular?
The npm package zod-prisma-types receives a total of 73,142 weekly downloads. As such, zod-prisma-types popularity was classified as popular.
🌐
socket.dev
socket.dev › npm › package › zod-prisma-types
zod-prisma-types - npm Package Security Analysis - Socket.dev
Is zod-prisma-types well maintained?
We found that zod-prisma-types demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
🌐
socket.dev
socket.dev › npm › package › zod-prisma-types
zod-prisma-types - npm Package Security Analysis - Socket.dev
🌐
npm
npmjs.com › package › prisma-zod-generator
prisma-zod-generator - npm
# Install npm install -D prisma-zod-generator # Add to schema.prisma generator zod { provider = "prisma-zod-generator" } # Generate npx prisma generate
      » npm install prisma-zod-generator
    
Published   Feb 14, 2026
Version   2.1.4
🌐
GitHub
github.com › CarterGrimmeisen › zod-prisma
GitHub - CarterGrimmeisen/zod-prisma: A custom prisma generator that creates Zod schemas from your Prisma model. · GitHub
This provides a way of automatically generating them with your prisma · dts-cli · Zod · Based on this gist · To get a local copy up and running follow these simple steps. This project utilizes yarn and if you plan on contributing, you should too. npm install -g yarn ·
Starred by 916 users
Forked by 104 users
Languages   TypeScript
🌐
GitHub
github.com › chrishoermann › zod-prisma-types
GitHub - chrishoermann/zod-prisma-types: Generator creates zod types for your prisma models with advanced validation · GitHub
Since there were no generators out there that met my requirements or they weren't actively maintained at that time I decided to write zod-prisma-type. via npm: npm install zod-prisma-types ·
Starred by 867 users
Forked by 76 users
Languages   TypeScript 99.7% | JavaScript 0.3%
🌐
npm
npmjs.com › package › @hatkom › nestjs-zod-prisma
@hatkom/nestjs-zod-prisma - npm
March 24, 2026 - A Prisma generator that creates Zod schemas for all of your models. Latest version: 1.0.2, last published: 2 months ago. Start using @hatkom/nestjs-zod-prisma in your project by running `npm i @hatkom/nestjs-zod-prisma`. There are no other projects ...
      » npm install @hatkom/nestjs-zod-prisma
    
Published   Mar 24, 2026
Version   1.0.2
Find elsewhere
🌐
GitHub
github.com › omar-dulaimi › prisma-zod-generator
GitHub - omar-dulaimi/prisma-zod-generator: Prisma 2+ generator to emit Zod schemas from your Prisma schema · GitHub
# Install npm install -D prisma-zod-generator # Add to schema.prisma generator zod { provider = "prisma-zod-generator" } # Generate npx prisma generate
Starred by 824 users
Forked by 77 users
Languages   TypeScript 95.2% | JavaScript 3.1% | CSS 1.6% | Shell 0.1%
🌐
Socket
socket.dev › npm › package › zod-prisma-types
zod-prisma-types - npm Package Security Analysis - Socket.dev
December 6, 2022 - Generates zod schemas from Prisma models with advanced validation. Version: 3.3.11 was published by chris_hoermann. Start using Socket to analyze zod-...
🌐
DEV Community
dev.to › polliog › building-a-type-safe-backend-with-trpc-zod-and-prisma-pk
Building a Type-Safe Backend with tRPC, Zod, and Prisma - DEV Community
December 3, 2025 - The magic happens when these three work together: Prisma generates types from your database, Zod validates input at runtime while inferring TypeScript types, and tRPC ensures your frontend knows exactly what your backend expects and returns.
🌐
Reddit
reddit.com › r/typescript › which source of truth in a ts/zod/prisma project?
r/typescript on Reddit: Which source of truth in a TS/Zod/Prisma project?
July 17, 2023 -

I have a Typescript project and want to use form validation with Zod on the front end. I’m also using Prisma ORM. The issue is I’m struggling to get one source of truth for the resource being created/updated. How do you keep those in sync? At the moment, I have 3 separate schemas. What’s the best practice to define your schema once and keep TS, DB and frontend validation in sync?

🌐
jsDelivr
jsdelivr.com › package › npm › prism-prisma-zod-generator
prism-prisma-zod-generator CDN by jsDelivr - A CDN for npm and GitHub
December 10, 2022 - Prisma 2+ generator to emit Zod schemas from your Prisma schema · Version 0.7.1 License MIT · Keywords · prismaprisma-clientprisma-schemazodprisma-generatorprisma-zod-generator · INSTALL · Version: Static · Static · Latest Patch · Latest Minor · Latest Major ·
Published   Nov 09, 2022
🌐
GitHub
v3.zod.dev
Zod | Documentation
drizzle-zod: Emit Zod schemas from your Drizzle schema. prisma-trpc-generator: Emit fully implemented tRPC routers and their validation schemas using Zod.
🌐
YouTube
youtube.com › watch
Effortless Data Validation in Node.js with Zod & Prisma ORM | Mastering Form Validation - YouTube
"Elevate your Node.js development skills by mastering data validation using Zod and Prisma ORM! In this tutorial, we'll guide you through the process of impl...
Published   November 16, 2023
🌐
Reddit
reddit.com › r/node › anyone knows how prisma-zod-generator is meant to be used?
r/node on Reddit: Anyone knows how prisma-zod-generator is meant to be used?
May 23, 2023 -

I tried adding a the Prisma generator Prisma Zod Generator to my Remix project but I am struggling a bit with understanding how it is supposed to be used when updating a model. I have a custom model TextContent defined as such:

model TextContent {
  content   Content @relation(fields: [contentId], references: [id], onDelete: Cascade)
  contentId String  @id
  text      String
}

I am now trying to create an action function where I validate the input via the generated schema. I understood that the zod schema parse method won't work directly on the FormData object that remix uses so I made use of Remix Params Helper which offers a convenient helper method getFormData where you simply put in the request and the zod schema object to get the parsed data:

export async function action({ request, params }: ActionArgs) {
  const { data } = await getFormData(request, TextContentUncheckedUpdateInputObjectSchema)
  await prisma.textContent.update({
    data,
    ^^^^
    where: {
      contentId: params.contentId
    }
  });
  return null;
}

The problem now is that I get a very long typechecking error on data inside the prisma update call:

TS2322: Type 'TextContentUncheckedUpdateInput | undefined' is not assignable to type '(Without<TextContentUpdateInput, TextContentUncheckedUpdateInput> & TextContentUncheckedUpdateInput) | (Without<...> & TextContentUpdateInput)'.   Type 'undefined' is not assignable to type '(Without<TextContentUpdateInput, TextContentUncheckedUpdateInput> & TextContentUncheckedUpdateInput) | (Without<...> & TextContentUpdateInput)'.  index.d.ts(7573, 5): The expected type comes from property 'data' which is declared here on type '{ select?: TextContentSelect | null | undefined; include?: TextContentInclude | null | undefined; data: (Without<TextContentUpdateInput, TextContentUncheckedUpdateInput> & TextContentUncheckedUpdateInput) | (Without<...> & TextContentUpdateInput); where: TextContentWhereUniqueInput; }'

Which is kinda difficult to decipher. I find that it not so super clear how the many different generated schemas are meant to be applied, the docs only offer one single usage example. Any ideas?

Update

Realized that I had used getFormData instead of getFormDataOrFail which made data possibly undefined. After fixing it I now get a problem during runtime instead where data returned by the getFormDataOrFail is an empty object. I have double checked that the correct data is contained in the request as well (If I check the contents of request.formData() I can see both a value for contentId & text). So that's a new problem which I have no idea how to solve.

Update 2

I suspected that my application wasn't bundling the code with getFormDataOrFail correctly and after making some config changes I now get an error message when trying to parse the data:

Error: Unexpected type ZodUnion for key contentId
    at processDef (my-app/node_modules/remix-params-helper/dist/cjs/helper.js:179:15)
    at processDef (my-app/node_modules/remix-params-helper/dist/cjs/helper.js:162:9)
    at parseParams (my-app/node_modules/remix-params-helper/dist/cjs/helper.js:36:9)
    at getParamsInternal (my-app/node_modules/remix-params-helper/dist/cjs/helper.js:54:9)
    at getFormDataOrFail (my-app/node_modules/remix-params-helper/dist/cjs/helper.js:120:20)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at action (my-app/app/routes/contents.$contentId.tsx:12:15)
    at Object.callRouteActionRR (my-app/build/server.js:39649:20)
    at callLoaderOrAction (my-app/build/server.js:38772:20)
    at submit (my-app/build/server.js:38365:20)

This is getting more confusing every time :)

Update 3

It seems the problem is in Remix Params Helper as it doesn't yet have support for ZodUnion types. I resorted to using Zodix instead.

🌐
jsDelivr
jsdelivr.com › package › npm › nestjs-zod-prisma
nestjs-zod-prisma CDN by jsDelivr - A CDN for npm and GitHub
July 13, 2023 - A Prisma generator that creates Zod schemas for all of your models · Version 3.0.1 License MIT · Keywords · zodprismageneratornestjs-zod · INSTALL · Version: Static · Static · Latest Patch · Latest Minor · Latest Major · Learn more ...
Published   May 18, 2022