src/Form/RecaptchaType.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Form;
  3. use App\Entity\User;
  4. use Symfony\Component\Form\AbstractType;
  5. use Symfony\Component\Form\FormBuilderInterface;
  6. use Symfony\Component\OptionsResolver\OptionsResolver;
  7. use Karser\Recaptcha3Bundle\Form\Recaptcha3Type;
  8. use Karser\Recaptcha3Bundle\Validator\Constraints\Recaptcha3;
  9. class RecaptchaType extends AbstractType
  10. {
  11.     public function buildForm(FormBuilderInterface $builder, array $options)
  12.     {
  13.         $builder->add('captcha'Recaptcha3Type::class, [
  14.             'constraints' => new Recaptcha3(['message' => 'There were problems with your captcha. Please try again or contact with support and provide following code(s): {{ errorCodes }}']),
  15.             'action_name' => 'homepage',
  16.             // 'script_nonce_csp' => $nonceCSP,
  17.             // 'locale' => 'de',
  18.         ]);
  19.     }
  20. }
  21. ?>