-
-
Notifications
You must be signed in to change notification settings - Fork 200
Closed
Description
this kind of zod schema dont work as expected
const schema = z.object({
title: z
.string()
.regex(/^[A-Za-z0-9_]+$/, "wrong pattern")
.nonempty("Required"),
someArray: z.array(z.string().nonempty()).min(1)
});
Steps to reproduce the behavior:
-
- fill title input
-
- press submit
-
- fill array input
-
- press submit
-
- clear array input
- in console errors changes shape of field someArray from Object to Array
https://codesandbox.io/s/gifted-hopper-k4ndp?file=/src/App.tsx
stee1housejorisre
Metadata
Metadata
Assignees
Labels
No labels