zod superRefine or refine rules depending on another field value.
npx shadcn@latest add @shadcnblocks/form-form-validation-5
Sign in or get a license at Shadcn Blocks to see its source and install it.