Function createZodValidationHook

  • Creates a validation hook from a Zod schema.

    Parameters

    • zodSchema: any

      Zod schema instance

    • options: ZodValidationOptions = {}

      Validation options

      • coerce

        Whether to coerce values according to Zod's coerce (default: true)

      • mode

        'strict' (throw on first error) or 'collect' (collect all errors)

    Returns RowHook

    Validation hook compatible with JTCSV hooks.perRow