mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +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})$/'
|
pattern: '/^([\+{1}])([0-9\s*]{4,20})$/'
|
||||||
groups: [general, creation]
|
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'
|
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:
|
mobilenumber:
|
||||||
- Regex:
|
- Regex:
|
||||||
pattern: '/^([\+{1}])([0-9\s*]{4,20})$/'
|
pattern: '/^([\+{1}])([0-9\s*]{4,20})$/'
|
||||||
groups: [general, creation]
|
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'
|
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:
|
constraints:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user