diff --git a/Resources/config/validation.yml b/Resources/config/validation.yml index d201c516e..a430847e5 100644 --- a/Resources/config/validation.yml +++ b/Resources/config/validation.yml @@ -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: