mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 15:43:51 +00:00
Features/new phones
This commit is contained in:
@@ -22,7 +22,7 @@ services:
|
||||
$closingMotiveRepository: '@Chill\PersonBundle\Repository\ClosingMotiveRepository'
|
||||
tags:
|
||||
- { name: form.type, alias: closing_motive }
|
||||
|
||||
|
||||
Chill\PersonBundle\Form\AccompanyingPeriodType:
|
||||
arguments:
|
||||
$config: "%chill_person.accompanying_period_fields%"
|
||||
@@ -39,10 +39,17 @@ services:
|
||||
- '@Symfony\Component\Translation\TranslatorInterface'
|
||||
tags:
|
||||
- { name: form.type }
|
||||
|
||||
|
||||
Chill\PersonBundle\Form\Type\PersonAltNameType:
|
||||
arguments:
|
||||
$configHelper: '@Chill\PersonBundle\Config\ConfigPersonAltNamesHelper'
|
||||
$translatableStringHelper: '@chill.main.helper.translatable_string'
|
||||
tags:
|
||||
- { name: form.type }
|
||||
|
||||
Chill\PersonBundle\Form\Type\PersonPhoneType:
|
||||
arguments:
|
||||
$phonenumberHelper: '@Chill\MainBundle\Phonenumber\PhonenumberHelper'
|
||||
$em: '@Doctrine\ORM\EntityManagerInterface'
|
||||
tags:
|
||||
- { name: form.type }
|
||||
|
@@ -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 ]
|
||||
|
Reference in New Issue
Block a user