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