Is it safe to import validators generated by drizzle-zod
into frontend code?
#2237
Unanswered
TClark1011
asked this question in
Q&A
Replies: 1 comment
-
You should be able to restrict the schema type by using the pick function. From the docs:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My instincts tell me that it wouldn't be since you would also be importing your drizzle schemas which may hold backend-only code.
If not, what alternatives are there for runtime type safety on the frontend?
Beta Was this translation helpful? Give feedback.
All reactions