Create a Zod schema for CAPTCHA validation if enabled for the given form. Returns an empty schema if CAPTCHA is not configured for this form.

  • Parameters

    • formKey: string

      Form identifier to check CAPTCHA configuration

    • translate: TranslateFn = ...

      Optional i18n function for error messages

    Returns ZodObject<{}, $strip>

    Zod schema for CAPTCHA fields or empty schema