add mobilenumber + validation on email and phonenumber (regex)

This commit is contained in:
nobohan
2018-05-14 12:17:33 +02:00
parent db00a0d265
commit 2f03f925ca
3 changed files with 146 additions and 108 deletions

View File

@@ -27,6 +27,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Chill\PersonBundle\Form\Type\GenderType;
use Chill\MainBundle\Form\Type\Select2CountryType;
@@ -80,7 +81,7 @@ class PersonType extends AbstractType
}
if ($this->config['email'] === 'visible') {
$builder->add('email', TextareaType::class, array('required' => false));
$builder->add('email', EmailType::class, array('required' => false));
}
if ($this->config['country_of_birth'] === 'visible') {