Closed Lon4ry closed 5 months ago
If you try to do refine on all data of schema and try to check if it's an object you will get unexpectly false.
Example:
import * as zod from "zod"; import { isZodObject, parseZodSchema } from "zod-key-parser"; const schema = zod.object({ password: zod.string(), confirm: zod.string(), }) .refine(({ password, confirm }) => password === confirm, { message: "", path: ["confirm"], }); console.log(isZodObject(schema)); // false console.log(parseZodSchema(schema)); // as a result, keys will be just {}
Hi, this issue has been fixed in the latest release! @Lon4ry sorry for waiting
If you try to do refine on all data of schema and try to check if it's an object you will get unexpectly false.
Example: