• Type Parameters

    • T

    Parameters

    • Optionalcheck: (data: any) => any
    • Optionalparams: string | CustomParams | (input: any) => CustomParams
    • Optionalfatal: boolean

      Pass fatal into the params object instead:

      z.string().custom((val) => val.length > 5, { fatal: false })
      

    Returns ZodType<T, ZodTypeDef, T>