There is an open feature request for Prisma to support runtime model validation directly at the Schema level. Alternatively, you can leverage the Client Extensions to perform validation. There is an example in this blog post that shows how to perform custom runtime validation.

Answer from Raphael Etim on Stack Overflow
🌐
Prisma
prisma.io › home › validate › validate
prisma validate | Validate Prisma Schema | Prisma Documentation
Validate Prisma schema syntax and configuration with prisma validate. Catch errors before generation. Use in CI/CD pipelines.
Discussions

next.js - "Single source of truth" schema/validation class for server (NestJs/GraphQL/TypeGraphQL/Prisma) and client (NextJs) - Stack Overflow
I'm building an Typescript application using an NX monorepo, NestJs/GraphQL/TypeGraphQL (built into @nestjs/graphql)/Prisma/PostgreSQL on the server, and NextJs on the client. With this stack (when... More on stackoverflow.com
🌐 stackoverflow.com
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
Exposing Prisma's internal validation functions
Question Reopening an older question that was previously asked but closed without an answer: #18111 The schema validation done by Prisma before sending requests is great. I need to separate the val... More on github.com
🌐 github.com
2
1
February 17, 2026
validate form
Hi, I'm new to Prisma. my API looks like this : import type { NextApiRequest, NextApiResponse } from 'next'; import prisma from '../../../lib/prisma'; export default async (req: NextApiRequest, res... More on github.com
🌐 github.com
2
1
January 1, 2023
🌐
Prisma
prisma.io › home › format › format
prisma format | Format & Validate Prisma Schema | Prisma Documentation
The prisma format command formats your Prisma schema file. It validates, formats, and persists the schema.
🌐
Prisma
prisma.io › home › crud › crud › crud › crud
CRUD (Reference) | Prisma Documentation
The id is auto-generated. Your schema determines which fields are mandatory.
🌐
Medium
medium.com › @blake.kimball › effortless-form-and-data-validation-in-react-with-mui-formik-yup-prisma-e2da346cb2c3
Effortless Form and Data Validation in React with MUI, Formik, Yup & Prisma | by Blake Kimball | Medium
June 26, 2023 - In this article, I’m going to show you how to create a comprehensive form solution for your React web application. These forms will take advantage of the Material UI component library MUI, the form validation library Formik, the schema builder and validator Yup, and Prisma ORM.
🌐
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
Find elsewhere
🌐
Prisma
prisma.io › home › prisma validator › prisma validator › prisma validator › prisma validator › prisma validator
Prisma validator | Prisma Documentation
ReferencePrisma CLI referencePrisma ... ... The Prisma validator is a utility function that takes a generated type and returns a type-safe object which adheres to the generated types model fields....
🌐
Prisma
prisma.io › home › type safety overview › type safety overview › type safety overview
Type safety | Prisma Documentation
To help you create highly type-safe applications, Prisma Client provides a set of type utilities that tap into input and output types. These types are fully dynamic, which means that they adapt to any given model and schema.
🌐
Medium
medium.com › yavar › prisma-runtime-custom-validation-to-models-acd4362efaa5
Prisma runtime custom validation to models | by Gnanabillian | Medium
July 6, 2023 - The schema level validates the request’s type and which fields are required and etc. The model level is a runtime validation of our application, this validation will be executed before the data write-in database. So it provides data accuracy, and completeness of the dataset by eliminating data errors from any project to ensure that the data is not corrupted. Prisma Client has type-safety and run-time type validation but we can not implement custom validation.
🌐
ZenStack
zenstack.dev › blog › form-validation
Streamlining Form Validation in Your Javascript Stack | ZenStack
July 4, 2023 - One benefit of using react-hooks-form is that it allows you to add validation rules to fields. However, we don't really need to do that because we've already expressed all the rules in the ZModel, and we would like to reuse it! Remember we ran the zenstack generate command to compile the ZModel into "schema.prisma...
🌐
Prisma
prisma.io › home › custom validation › custom validation › custom validation › custom validation › custom validation
Custom validation | Prisma Documentation
In this example, validations are only run on the top level data object passed to methods such as prisma.product.create(). Validations implemented this way do not automatically run for nested writes. ... import { PrismaClient, Prisma } from "../prisma/generated/client"; import { z } from "zod"; /** * Zod schema */ export const ProductCreateInput = z.object({ slug: z .string() .max(100) .regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/), name: z.string().max(100), description: z.string().max(1000), price: z .instanceof(Prisma.Decimal) .refine((price) => price.gte("0.01") && price.lt("1000000.00")), }) satisfi
🌐
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?

🌐
GitHub
github.com › prisma › prisma › discussions › 29167
Exposing Prisma's internal validation functions · prisma/prisma · Discussion #29167
February 17, 2026 - Use Prisma.validator<T>() + Zod (or Valibot) as the pre-flight layer for incoming payloads. Keep Prisma query construction pure/deterministic (build args object in one function). Run schema/business validation on the args object before calling ...
Author   prisma
🌐
GitHub
github.com › prisma › prisma › discussions › 22058
Advice on implementing custom validation with Prisma Client · prisma/prisma · Discussion #22058
Write Zod schemas for the models that need custom validation to validate email/url/other fields · Create a Prisma Client Extension that uses all of the Zod schemas I've written.
Author   prisma
🌐
DevSheets
devsheets.io › sheets › prisma
Prisma ORM Cheat Sheet
import { Prisma } from '@prisma/client' // Handle specific Prisma errors try { await prisma.user.create({ data: { email: 'user@example.com' } }) } catch (error) { if (error instanceof Prisma.PrismaClientKnownRequestError) { if (error.code === 'P2002') { console.log('Unique constraint violation:', error.meta?.target) } else if (error.code === 'P2025') { console.log('Record not found') } } else if (error instanceof Prisma.PrismaClientValidationError) { console.log('Validation error:', error.message) } else { throw error } } ... // Use select instead of include const users = await prisma.user.fin
🌐
GitHub
github.com › prisma › prisma › issues › 22063
Prisma schema validation throwing on valid default · Issue #22063 · prisma/prisma
November 22, 2023 - --> schema.prisma:92 | 91 | updatedAt DateTime @default(now()) @updatedAt 92 | history Json @default([]) as you can see, i am defining a history property of type json with a default of an empty array. the validator takes offence to this, saying it can't be a list.
Author   prisma