mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-24 00:23:50 +00:00
add email and phonenumber: wrote migration file, changed templates, changed validation rules
This commit is contained in:
@@ -31,8 +31,12 @@ Chill\PersonBundle\Entity\Person:
|
||||
memo:
|
||||
type: text
|
||||
default: ''
|
||||
contactInfo:
|
||||
type: text
|
||||
nullable: true
|
||||
email:
|
||||
type: text
|
||||
nullable: true
|
||||
proxyAccompanyingPeriodOpenState:
|
||||
type: boolean
|
||||
name: proxy_open
|
||||
@@ -41,6 +45,11 @@ Chill\PersonBundle\Entity\Person:
|
||||
phonenumber:
|
||||
type: text
|
||||
nullable: true
|
||||
length: 40
|
||||
mobilenumber:
|
||||
type: text
|
||||
nullable: true
|
||||
length: 40
|
||||
manyToOne:
|
||||
countryOfBirth:
|
||||
targetEntity: Chill\MainBundle\Entity\Country
|
||||
|
@@ -34,11 +34,12 @@ Chill\PersonBundle\Entity\Person:
|
||||
- Email:
|
||||
groups: [general, creation]
|
||||
message: 'The email "{{ value }}" is not a valid email.'
|
||||
checkMX: true
|
||||
phonenumber:
|
||||
- Regex:
|
||||
pattern: '/^([\+{1}]|[0])([0-9\s*]{4,20})$/'
|
||||
pattern: '/^([\+{1}])([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 '
|
||||
message: 'Invalid phone number: it should begin with the international prefix starting with "+", hold only digits and be smaller than 20 characters. Ex: +33123456789 '
|
||||
|
||||
|
||||
constraints:
|
||||
|
Reference in New Issue
Block a user