Browse Source

Correctif Captcha

develop
Guillaume 3 years ago
parent
commit
cc415b9650
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      ShopBundle/Services/Utils.php

+ 2
- 0
ShopBundle/Services/Utils.php View File

use Symfony\Component\HttpFoundation\ParameterBag; use Symfony\Component\HttpFoundation\ParameterBag;
use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Validator\Constraints\EqualTo; use Symfony\Component\Validator\Constraints\EqualTo;
use Symfony\Component\Validator\Constraints\NotNull;
use Symfony\Contracts\Translation\TranslatorInterface; use Symfony\Contracts\Translation\TranslatorInterface;


class Utils class Utils
'class' => 'special-field' 'class' => 'special-field'
], ],
'constraints' => [ 'constraints' => [
new NotNull(),
new EqualTo(['value' => $this->parameterBag->get('app.captcha_value'), 'message' => 'Valeur incorrecte']) new EqualTo(['value' => $this->parameterBag->get('app.captcha_value'), 'message' => 'Valeur incorrecte'])
], ],
]); ]);

Loading…
Cancel
Save