Skip to content

Commit c83fa74

Browse files
ArthurGambyArthur Gamby
andauthored
docs: update Prisma.validator api availability information in client versions
Co-authored-by: Arthur Gamby <[email protected]>
1 parent c3771ee commit c83fa74

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

content/200-orm/200-prisma-client/400-type-safety/050-prisma-validator.mdx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,13 @@ This page introduces the `Prisma.validator` and offers some motivations behind w
1212

1313
</TopBlock>
1414

15-
> **Note**: If you have a use case for `Prisma.validator`, be sure to check out this [blog post](https://www.prisma.io/blog/satisfies-operator-ur8ys8ccq7zb) about improving your Prisma Client workflows with the new TypeScript `satisfies` keyword. It's likely that you can solve your use case natively using `satisfies` instead of using `Prisma.validator`.
16-
15+
:::warning
16+
The `Prisma.validator` API is only available when using the **legacy** `prisma-client-js` generator. It’s **not supported** in the new `prisma-client` generator.
17+
18+
In most cases, you can achieve the same behavior using TypeScript’s native `satisfies` operator instead of `Prisma.validator`.
19+
20+
If you previously used `Prisma.validator`, check out this [blog post](https://www.prisma.io/blog/satisfies-operator-ur8ys8ccq7zb) to learn how the new `satisfies` keyword can improve and simplify your Prisma Client workflows.
21+
:::
1722
## Creating a typed query statement
1823

1924
Let's imagine that you created a new `userEmail` object that you wanted to re-use in different queries throughout your application. It's typed and can be safely used in queries.

0 commit comments

Comments
 (0)