Features/new phones

This commit is contained in:
Jean-Francois Monfort
2021-04-02 12:11:20 +00:00
committed by Julien Fastré
parent 6ea45e4d16
commit 27c680bb03
14 changed files with 502 additions and 123 deletions

View File

@@ -51,8 +51,9 @@ Chill\PersonBundle\Entity\Person:
- Chill\MainBundle\Validation\Constraint\PhonenumberConstraint:
type: mobile
groups: [ general, creation ]
otherPhoneNumbers:
- Valid:
traverse: true
constraints:
- Callback:
callback: isAccompanyingPeriodValid
@@ -77,3 +78,14 @@ Chill\PersonBundle\Entity\AccompanyingPeriod:
constraints:
- Callback:
callback: isDateConsistent
Chill\PersonBundle\Entity\PersonPhone:
properties:
phonenumber:
- Regex:
pattern: '/^([\+{1}])([0-9\s*]{4,20})$/'
groups: [ general, creation ]
message: 'Invalid phone number: it should begin with the international prefix starting with "+", hold only digits and be smaller than 20 characters. Ex: +33123456789'
- Chill\MainBundle\Validation\Constraint\PhonenumberConstraint:
type: any
groups: [ general, creation ]