src/Validator/UniqueUserEmail.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Validator;
  3. use Symfony\Component\Validator\Constraint;
  4. /**
  5. * @Annotation
  6. */
  7. class UniqueUserEmail extends Constraint
  8. {
  9. /*
  10. * Any public properties become valid options for the annotation.
  11. * Then, use these in your validator class.
  12. */
  13. public bool $checkAgainstLoggedInUser = false;
  14. public function getDefaultOption(): string
  15. {
  16. return 'checkAgainstLoggedInUser';
  17. }
  18. public string $message = 'L\'adresse email "{{ value }}" existe déjà.';
  19. }