src/Validator/UniqueEmail.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Validator;
  3. use Symfony\Component\Validator\Constraint;
  4. /**
  5.  * @Annotation
  6.  *
  7.  * @Target({"PROPERTY", "METHOD", "ANNOTATION"})
  8.  */
  9. #[\Attribute(\Attribute::TARGET_PROPERTY \Attribute::TARGET_METHOD \Attribute::IS_REPEATABLE)]
  10. class UniqueEmail extends Constraint
  11. {
  12.     /*
  13.      * Any public properties become valid options for the annotation.
  14.      * Then, use these in your validator class.
  15.      */
  16.     public $message 'Cette adresse email "{{ value }}" est déjà utilisée.';
  17. }