remix-params-helper icon indicating copy to clipboard operation
remix-params-helper copied to clipboard

Handle ZodUnion types in processDef()

Open hakimLyon opened this issue 1 year ago • 0 comments

Updated the processDef() function to properly handle ZodUnion types in the Zod schema. When encountering a ZodUnion, the function now tries to parse the value with each option of the union until one succeeds. If parsing fails with all options, an error will be thrown. This ensures that ZodUnion types are correctly processed during data validation.

hakimLyon avatar Jul 30 '23 06:07 hakimLyon