How to use [validators.recaptcha]

The reference page of validators.recaptcha has its arguments, constraints and declaration.

This is probably the most complex validator, and requires 3 arguments.

  • [site-key] - Site key as provided to you by Google’s reCAPTCHA admin panel
  • [secret] - Secret as provided to you by Google’s reCAPTCHA admin panel
  • [min] - Minimum value, a decimal value between 0 and 1. A good value here is typically 0.3

To use this validator you will need a Google reCAPTCHA account, version 3, at which point you can use it as follows.

validators.recaptcha:x:@.arguments/*/recaptcha_value
   site-key:xyz
   secret:qwerty
   min:decimal:0.3