Is there a way in Zod to validate a field in a schema conditionally on another fields value?
i.e if z.object.itemType is set then z.object.itemMeta should not be null.
Using refine it appears you don't have access to the object your inside of, so you can't check there and I don't want to refine on the whole object as I can only return one error message.
Any thoughts or ideas?
Using refine it appears you don't have access to the object your inside of, so you can't check there and I don't want to refine on the whole object as I can only return one error message.
Any thoughts or ideas?
