src/Form/ResetPasswordRequestFormType.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Form;
  3. use Symfony\Component\Form\AbstractType;
  4. use Symfony\Component\Form\Extension\Core\Type\EmailType;
  5. use Symfony\Component\Form\FormBuilderInterface;
  6. use Symfony\Component\OptionsResolver\OptionsResolver;
  7. use Symfony\Component\Validator\Constraints\NotBlank;
  8. class ResetPasswordRequestFormType extends AbstractType
  9. {
  10.     public function buildForm(FormBuilderInterface $builder, array $options): void
  11.     {
  12.         $builder
  13.             ->add('email'EmailType::class, [
  14.                 'label' => 'Adresse mail',
  15.                 'attr' => ['autocomplete' => 'email''class' => 'form-control''placeholder' => 'Adresse Mail'],
  16.                 'constraints' => [
  17.                     new NotBlank([
  18.                         'message' => 'Veuillez entrer votre adresse e-mail',
  19.                     ]),
  20.                 ],
  21.             ])
  22.         ;
  23.     }
  24.     public function configureOptions(OptionsResolver $resolver): void
  25.     {
  26.         $resolver->setDefaults([]);
  27.     }
  28. }