src/Form/ForgottenPasswordType.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Form;
  3. use Symfony\Component\Form\AbstractType;
  4. use Symfony\Component\Form\FormBuilderInterface;
  5. use Symfony\Component\OptionsResolver\OptionsResolver;
  6. use Symfony\Component\Form\Extension\Core\Type\EmailType;
  7. use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
  8. use Symfony\Component\Validator\Constraints\Email;
  9. use Symfony\Component\Validator\Constraints\NotBlank;
  10. class ForgottenPasswordType extends AbstractType
  11. {
  12.     public function buildForm(FormBuilderInterface $builder, array $options)
  13.     {
  14.         $builder
  15.             ->add(
  16.                 'email',
  17.                 EmailType::class,
  18.                 [
  19.                     'required'    => true,
  20.                     'label'       => 'Email',
  21.                     'attr'        => 
  22.                     [
  23.                         'placeholder' => 'Entrez votre email',
  24.                     ],
  25.                     'constraints' => [
  26.                         new NotBlank(),
  27.                         new Email()
  28.                     ]
  29.                 ]
  30.             )
  31.         ;
  32.     }
  33.     public function configureOptions(OptionsResolver $resolver)
  34.     {
  35.         $resolver->setDefaults([
  36.             // Configure your form options here
  37.         ]);
  38.     }
  39. }