🌐
npm
npmjs.com › package › prisma-zod-generator
prisma-zod-generator - npm
Prisma 2+ generator to emit Zod schemas from your Prisma schema. Latest version: 2.1.4, last published: 5 months ago. Start using prisma-zod-generator in your project by running `npm i prisma-zod-generator`. There are 3 other projects in the ...
      » npm install prisma-zod-generator
    
Published   Feb 14, 2026
Version   2.1.4
🌐
Omar-dulaimi
omar-dulaimi.github.io › prisma-zod-generator
Prisma Zod Generator
Built with modern development in mind, featuring everything you need for production-ready applications. ... Auto-generate Zod schemas from your Prisma schema with multiple output modes.
Discussions

Anyone knows how prisma-zod-generator is meant to be used?
For your new empty object problem, have you tried stepping through the debugger? (In your ide, visual code, etc) More on reddit.com
🌐 r/node
5
2
May 23, 2023
Which source of truth in a TS/Zod/Prisma project?
I don't know if it's the best practic but you can create decorators on your entities class and properties in order to generate metadata. Then you can create a function that read those metadata and build prisma validators from them. And another one for Zod validation. I did something similar with an Angular / NestJS / TypeORM stack and it was working fine More on reddit.com
🌐 r/typescript
18
11
July 17, 2023
Let Zod infer types for schema OR use generated types from OpenAPI schema to type the forms
You can generate Zod schemas out of OpenAPI using https://github.com/astahmer/openapi-zod-client (generating only schemas requires non-default configuration of this tool, but is definitely doable) More on reddit.com
🌐 r/typescript
5
5
August 30, 2023
How do people use Zod on a large project?
I have noticed domething similar just when TESTING zod. Did you try typebox? For me it was a dream come true compared to the typesxript performance alone. I think the runtime performance is also way faster, but what mattered tp me was exactly what you described, the ide/tsserver performance. Anyway, interested in what your solution/issue will be, if you find one More on reddit.com
🌐 r/typescript
69
61
May 27, 2023
🌐
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
Prisma 2+ generator to emit Zod schemas from your Prisma schema - omar-dulaimi/prisma-zod-generator
Starred by 824 users
Forked by 77 users
Languages   TypeScript 95.2% | JavaScript 3.1% | CSS 1.6% | Shell 0.1%
🌐
GitHub
github.com › chrishoermann › zod-prisma-types
GitHub - chrishoermann/zod-prisma-types: Generator creates zod types for your prisma models with advanced validation · GitHub
Generator creates zod types for your prisma models with advanced validation - chrishoermann/zod-prisma-types
Starred by 867 users
Forked by 76 users
Languages   TypeScript 99.7% | JavaScript 0.3%
🌐
Prisma
prisma.io › home › generators › generators › generators › generators
Generators (Reference) | Prisma Documentation
prisma-class-validator-generator: Emit TypeScript models from your Prisma schema with class validator validations ready. prisma-zod-generator: Emit Zod schemas from your Prisma schema.
🌐
GitHub
github.com › CarterGrimmeisen › zod-prisma
GitHub - CarterGrimmeisen/zod-prisma: A custom prisma generator that creates Zod schemas from your Prisma model. · GitHub
A custom prisma generator that creates Zod schemas from your Prisma model. - CarterGrimmeisen/zod-prisma
Starred by 916 users
Forked by 104 users
Languages   TypeScript
🌐
GitHub
github.com › omar-dulaimi › prisma-zod-generator › releases
Releases · omar-dulaimi/prisma-zod-generator
February 14, 2026 - Prisma 2+ generator to emit Zod schemas from your Prisma schema - omar-dulaimi/prisma-zod-generator
Author   omar-dulaimi
🌐
GitHub
github.com › omar-dulaimi › prisma-zod-generator › issues
Issues · omar-dulaimi/prisma-zod-generator
Prisma 2+ generator to emit Zod schemas from your Prisma schema - Issues · omar-dulaimi/prisma-zod-generator
Author   omar-dulaimi
Find elsewhere
🌐
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.

🌐
npm
npmjs.com › package › prism-prisma-zod-generator
prism-prisma-zod-generator - npm
December 10, 2022 - Prisma 2+ generator to emit Zod schemas from your Prisma schema. Latest version: 0.7.1, last published: 3 years ago. Start using prism-prisma-zod-generator in your project by running `npm i prism-prisma-zod-generator`. There are 1 other projects ...
      » npm install prism-prisma-zod-generator
    
Published   Dec 10, 2022
Version   0.7.1
Author   Omar Dulaimi
🌐
GitHub
github.com › topics › prisma-zod-generator
prisma-zod-generator · GitHub Topics · GitHub
A CLI that keeps your Zod schemas in sync with your Prisma models. It generates modular, type-safe validation files automatically, ensuring your database and application logic stay aligned.
🌐
GitHub
github.com › omar-dulaimi › prisma-zod-generator › graphs › contributors
Contributors to omar-dulaimi/prisma-zod-generator · GitHub
Prisma 2+ generator to emit Zod schemas from your Prisma schema - Contributors to omar-dulaimi/prisma-zod-generator
Author   omar-dulaimi
🌐
GitHub
github.com › Gabrola › zod-prisma
GitHub - Gabrola/zod-prisma: Generate Zod schemas from your Prisma schema
A custom prisma generator that creates Zod schemas from your Prisma model. Explore the docs » View Demo · Report Bug ·
Author   Gabrola
🌐
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
🌐
GitHub
github.com › electric-sql › prisma-generator-electric
GitHub - electric-sql/prisma-generator-electric: Generator creates the zod schemas that are needed for Electric based on Prisma schema · GitHub
Generator creates the zod schemas that are needed for Electric based on Prisma schema - electric-sql/prisma-generator-electric
Author   electric-sql
🌐
Vovk.ts
vovk.dev › realtime-ui › database
Designing the Database with Prisma and Zod Generator | Vovk.ts - Back-end Framework for Next.js App Router
May 5, 2026 - This allows us to define Zod models automatically and keeps our server-side code concise. ... // This is your Prisma schema file, // learn more about it in the docs: https://pris.ly/d/prisma-schema generator client { provider = "prisma-client-js" ...
🌐
UNPKG
unpkg.com › prisma-zod-generator
prisma-zod-generator
Prisma 2+ generator to emit Zod schemas from your Prisma schema · omar-dulaimi.github.io/prisma-zod-generator
🌐
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