mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
add validation for phonenumber
This commit is contained in:
parent
ca445f11c5
commit
c21b87b9c6
@ -40,11 +40,17 @@ Chill\PersonBundle\Entity\Person:
|
||||
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: landline
|
||||
groups: [ general ]
|
||||
mobilenumber:
|
||||
- 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: +33623456789'
|
||||
- Chill\MainBundle\Validation\Constraint\PhonenumberConstraint:
|
||||
type: mobile
|
||||
groups: [ general ]
|
||||
|
||||
|
||||
constraints:
|
||||
|
Loading…
x
Reference in New Issue
Block a user