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.                 'attr' => ['autocomplete' => 'email'],
  15.                 'constraints' => [
  16.                     new NotBlank([
  17.                         'message' => 'Saisir votre email',
  18.                     ]),
  19.                 ],
  20.             ])
  21.         ;
  22.     }
  23.     public function configureOptions(OptionsResolver $resolver): void
  24.     {
  25.         $resolver->setDefaults([]);
  26.     }
  27. }