You can use zId(ref?: string) and zUUID(ref?: string) to describe fields as ObjectID and UUID and add reference to another collection: import { extendZod } from "@zodyac/zod-mongoose"; import { z } from "zod"; extendZod(z); const zUser = z.object({ // Just the ID someId:...
ObjectID and UUID You can usezId(ref?: string)andzUUID(ref?: string)to describe fields as ObjectID and UUID and add reference to another collection: import{extendZod}from"@zodyac/zod-mongoose";import{z}from"zod";extendZod(z);constzUser=z.object({// Just the IDsomeId:zId(),wearable...