mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-24 00:23:50 +00:00
add mobilenumber + validation on email and phonenumber (regex)
This commit is contained in:
@@ -30,6 +30,17 @@ Chill\PersonBundle\Entity\Person:
|
||||
accompanyingPeriods:
|
||||
- Valid:
|
||||
traverse: true
|
||||
email:
|
||||
- Email:
|
||||
groups: [general, creation]
|
||||
message: 'The email "{{ value }}" is not a valid email.'
|
||||
phonenumber:
|
||||
- Regex:
|
||||
pattern: '/^([\+{1}]|[0])([0-9\s*]{4,20})$/'
|
||||
groups: [general, creation]
|
||||
message: 'Invalid phone number: it should begin with "0" or "+", hold only digits and be smaller than 20 characters '
|
||||
|
||||
|
||||
constraints:
|
||||
- Callback:
|
||||
callback: isAccompanyingPeriodValid
|
||||
|
Reference in New Issue
Block a user