src/Validator/CheckExistedParticipation.php line 8

  1. <?php
  2. namespace App\Validator;
  3. use Symfony\Component\Validator\Constraint;
  4. #[\Attribute]
  5. class CheckExistedParticipation extends Constraint
  6. {
  7.     /*
  8.      * Any public properties become valid options for the annotation.
  9.      * Then, use these in your validator class.
  10.      */
  11.     public $message 'Cette référence "{{ value }}" ne correspond à aucune participation.';
  12.     public function validatedBy():string
  13.     {
  14.         return static::class.'Validator';
  15.     }
  16.     public function getTargets():string
  17.     {
  18.         return self::CLASS_CONSTRAINT;
  19.     }
  20. }