vendor/karser/karser-recaptcha3-bundle/Validator/Constraints/Recaptcha3.php line 12

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Karser\Recaptcha3Bundle\Validator\Constraints;
  3. use Symfony\Component\Validator\Constraint;
  4. /**
  5. * @Annotation
  6. * @Target({"PROPERTY", "METHOD", "ANNOTATION"})
  7. */
  8. #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
  9. final class Recaptcha3 extends Constraint
  10. {
  11. const INVALID_FORMAT_ERROR = '7147ffdb-0af4-4f7a-bd5e-e9dcfa6d7a2d';
  12. protected const ERROR_NAMES = [
  13. self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR',
  14. ];
  15. protected static $errorNames = self::ERROR_NAMES;
  16. public $message = 'Your computer or network may be sending automated queries';
  17. public $messageMissingValue = 'The captcha value is missing';
  18. public function __construct(?array $options = null, ?string $message = null, ?string $messageMissingValue = null, ?array $groups = null, $payload = null)
  19. {
  20. parent::__construct($options ?? [], $groups, $payload);
  21. $this->message = $message ?? $this->message;
  22. $this->messageMissingValue = $messageMissingValue ?? $this->messageMissingValue;
  23. }
  24. }