<?php
namespace App\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Validator\Constraints\Email;
use Symfony\Component\Form\Extension\Core\Type\DateType;
/**
* Description of ReinitializeType
*
* @author Maxime Dequant
*/
class ReinitializeType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('nom', TextType::class, ['required' => true, 'label' => false])
->add('prenom', TextType::class, ['required' => true, 'label' => false])
->add('dateDeNaissance', DateType::class, ['widget' => 'single_text', 'required' => true, 'html5'=> false,'label' => false, 'format' => 'dd/MM/y', 'attr' => ['title' => 'Format valide: jj/mm/aaaa', 'pattern' => '([0-2][0-9]|(3)[0-1])(\/)(((0)[0-9])|((1)[0-2]))(\/)\d{4}']])
->add('courriel', EmailType::class, ['required' => true, 'label' => false])
->add('envoyer', SubmitType::class, ['attr' => ['class' => 'off-btn']]);
}
}