@swastikbhattacharyya/next-actions - v0.3.2
    Preparing search index...

    Function zodValidator

    • A validator that checks input against a given Zod schema.

      If parsing fails, it returns a validation result containing the list of Zod issues under the error code "zodValidator_invalidParams".

      Type Parameters

      • Schema extends $ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>

        The Zod schema used to validate the input.

      Parameters

      • schema: Schema

        The Zod schema instance.

      • params: output<Schema>

        The parameters to validate.

      Returns Promise<
          ValidationResultWithoutContext<
              { zodValidator_invalidParams: { issues: $ZodIssue[] } },
          >,
      >

      A promise resolving to a ValidationResult. If parsing fails then the result contains the error code "zodValidator_invalidParams along with the list of Zod issues.