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 OverflowPrisma
prisma.io › home › prisma validator › prisma validator › prisma validator › prisma validator
Prisma validator | Prisma Documentation
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.
orm - How to do Prisma runtime model validation? - Stack Overflow
In my application, I have validated the input credential at the DTO level by using class-validator. But I need runtime model validation like sequelize ORM. In sequelize: 'use strict'; import { Data... More on stackoverflow.com
Get type of Prisma validator
Hi, I read about Prisma validator https://www.prisma.io/docs/concepts/components/prisma-client/advanced-type-safety/prisma-validator But can we extends it more? More on github.com
Prisma Client Extension: support `Prisma.validator`
I got asked to make a feature request by @millsp #15074 (comment) I always define a select: when doing queries (because otherwise we get the equivalent of select *), and want to do the equivalent t... More on github.com
Prisma.validator is gone but docs still have it and not sure the alternative
The official Discord server of Prisma! Find us online at prisma.io ... Property 'validator' does not exist on type 'typeof Prisma'. More on answeroverflow.com
Best way to Validate and Submit Forms in Next.js15 using Zod ...
19:23
NestJS Prisma Tutorial #3 - Nestjs DTO Validations - YouTube
11:51
Effortless Data Validation in Node.js with Zod & Prisma ORM | ...
07:38
Validations in Prisma - YouTube
07:23
Prisma Auto Generate GraphQL Inputs with Validation from ...
01:47:36
Modern backend with TypeScript, PostgreSQL and Prisma - Part 2: ...
GitHub
github.com › prisma › prisma › discussions › 20658
Prisma.validator · prisma/prisma · Discussion #20658
export const conversationPopulated = Prisma.validator<Prisma.ConversationInclude>()({ participants: { include: participantPopulated, }, latestMessage: { include: { sender: { select: { id: true, username: true, }, }, }, }, });
Author prisma
GitHub
github.com › omar-dulaimi › prisma-class-validator-generator
GitHub - omar-dulaimi/prisma-class-validator-generator: Prisma 2+ generator to emit typescript models of your database with class validator · GitHub
Automatically generate TypeScript class-validator models from your Prisma schema Create type-safe validation classes with decorators from your database models
Starred by 91 users
Forked by 18 users
Languages TypeScript 98.0% | JavaScript 1.2% | Shell 0.8%
GitHub
github.com › prisma › prisma › issues › 18943
Prisma Client Extension: support `Prisma.validator` · Issue #18943 · prisma/prisma
April 26, 2023 - const postSelect = Prisma.validator<Prisma.PostSelect>()({ // .. }) Originally posted by @KATT in #15074 (comment) Reactions are currently unavailable · millsp · kind/featureA request for a new feature.A request for a new feature.tech/typescriptIssue for tech TypeScript.Issue for tech TypeScript.topic: clientExtensions ·
Author prisma
Answer Overflow
answeroverflow.com › m › 1415361252200288256
Prisma.validator is gone but docs still have it and not sure the alternative - Prisma
September 10, 2025 - 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.
npm
npmjs.com › package › @serviceup › prisma-generator-class-validator
@serviceup/prisma-generator-class-validator - npm
May 21, 2025 - Automatically generate typescript models of your database with class validator validations ready, from your Prisma Schema.
» npm install @serviceup/prisma-generator-class-validator
Published May 21, 2025
Version 6.6.1
npm
npmjs.com › package › prisma-class-validator
prisma-class-validator - npm
August 3, 2021 - Automatically generator class-validator schema from Prisma client projects.
» npm install prisma-class-validator
Published Mar 08, 2021
Version 1.1.3
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
npm
npmjs.com › package › prisma-class-validator-generator
prisma-class-validator-generator - npm
July 13, 2022 - Automatically generate TypeScript class-validator models from your Prisma schema Create type-safe validation classes with decorators from your database models
» npm install prisma-class-validator-generator
Published Nov 07, 2025
Version 6.2.0
DEV Community
dev.to › omardulaimi › how-to-automatically-generate-class-validator-models-from-your-prisma-schema-40g8
How to automatically generate Class Validator models from your Prisma schema - DEV Community
May 13, 2022 - generator class_validator { provider = "prisma-class-validator-generator" } 3- Run npx prisma generate for your schema(or the example below) model User { id Int @id @default(autoincrement()) email String @unique name String? posts Post[] } model Post { id Int @id @default(autoincrement()) createdAt DateTime @default(now()) updatedAt DateTime @updatedAt title String content String?
Medium
medium.com › @gnanabillian › prisma-runtime-custom-validation-to-models-acd4362efaa5
Prisma runtime custom validation to models | by Gnanabillian | Medium
July 6, 2023 - This client allows you to interact with the database and perform CRUD operations. In this example, we use Prisma Client’s $use method to define a middleware that intercepts all create or update operations on the User model. Inside the middleware, we define a Joi schema to validate the create and update data.