Javascript – Conditional validation in zod
I'm working with a validation schema using Zod, where I have an items field that represents an array of objects. In this scenario, I'm specifically using it for invoice items. Each item is an object with various properties. I'm facing…