src/Domain/Common/Constraints/FrenchMobilePhone.php line 13

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Domain\Common\Constraints;
  4. use Novaway\CoreBundle\Constraints\FrenchPhone;
  5. /**
  6.  * @Annotation
  7.  * @Target({"PROPERTY","ANNOTATION"})
  8.  */
  9. class FrenchMobilePhone extends FrenchPhone
  10. {
  11.     const PATTERN '/^((\+|00)33\s?|0)[6-7](\s?\d{2}){4}$/';
  12.     const MESSAGE 'Le format attendu est (+33|0033|0)(6|7) 23 45 67 89';
  13.     public $message self::MESSAGE;
  14.     public $pattern self::PATTERN;
  15. }