Skip to main content
0 votes
1 answer
15 views

I am using TypeScript in a learning / test NextJS app using WebStorm 2025.3.2. My WebStorm is showing red squiggly lines under onSubmit (2nd OnSubmit keyword) for return <form onSubmit={...
anjanesh's user avatar
  • 4,309
1 vote
2 answers
40 views

I am using react-hook-form 7.71.0, zod 4.3.5, and nextjs 16.1.0. I have the validation routine that works when called directly in code. I am using better-auth to check whether a user has been created ...
Chris Hunter-Johnson's user avatar
1 vote
1 answer
43 views

I’m using React Hook Form with Zod via zodResolver(schema). For most fields, schema validation is fine, but I have a field that needs extra validation based on data fetched inside the field component (...
user17741533's user avatar
0 votes
1 answer
47 views

I discovered that running console.log on a ZodError would result in an error being thrown. e.g. import z from 'zod' const schema = z.string() const { error } = schema.safeParse(3) console.log(error) ...
ngood97's user avatar
  • 531
3 votes
1 answer
144 views

How can I properly type react-hook-form with zodResolver when using z.coerce.number() for form inputs? The schema seems to correctly infer the types as numbers, but TypeScript is complaining about ...
Alif Laksono's user avatar
0 votes
1 answer
78 views

I am trying to log a JSON Schema created with zod. I tried converting to JSON Schema with zod-to-json-schema in Node.js. Here is what I see from console.log(jsonSchema): { '$schema': 'http://json-...
jwtrees's user avatar
  • 391
1 vote
0 answers
73 views

I have this zod schema with a discriminatedUnion: const mySchema = baseTypeSchema.extend({ id: z.string(), name: z.string(), specificData: z.discriminatedUnion("type", [...
MWB's user avatar
  • 1,909
0 votes
1 answer
201 views

I am working on an input form for adding a food item, but I am encountering an error that I've been unable to resolve and need help with. Below is the code: const schema = zod.object({ name: zod....
Sohail Shams's user avatar
3 votes
1 answer
241 views

Issue I'm working on a React application and wanted to try the newest version of Zod (4.1.13) for input validations along with react hook form. I've been struggling with the z.email() function as it's ...
Andres Gomez's user avatar
2 votes
0 answers
101 views

I'm using @asteasolutions/zod-to-openapi to generate OpenAPI documentation from Zod schemas. I have a recursive utility function makeSchemaDeepNullable that transforms all fields in a schema to ...
The witcher's user avatar
1 vote
0 answers
154 views

How to create optional value with Tanstack form and Zod? <script setup lang="ts"> import { useI18n } from 'vue-i18n'; import { z } from 'zod'; import { revalidateLogic, ...
user31869577's user avatar
2 votes
0 answers
75 views

I have the following schema in my RHF form: const latexSchema = z.string().refine( () => { return solutionRef.current?.editor?.state.doc.textContent.length! >= 10; }, 'Wymagane jest co ...
Korer's user avatar
  • 375
0 votes
0 answers
58 views

I'm building a microservice with Moleculer.js and TypeScript, using Zod v4 for schema validation. I need to validate API responses that return null for optional fields, while keeping strict validation ...
The witcher's user avatar
1 vote
1 answer
127 views

I have a React project using TypeScript, React Hook Form, and Zod. My Zod schema looks like this: import { z } from 'zod'; export const loyaltyNmvFormSchema = z.object({ maxPoint: z.coerce.number()....
Ali Ehyaie's user avatar
  • 1,324
2 votes
1 answer
128 views

I have a database that has some temporal tables. I have zod schemas for those tables and I am using those zod schemas to define the tables in Kysely. The schemas can be as follows: CREATE TABLE ...
zaplec's user avatar
  • 1,879

15 30 50 per page
1
2 3 4 5
48