src/Form/ResetPasswordRequestFormType.php line 14

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. use Symfony\Component\Form\Extension\Core\Type\SubmitType;
  9. use Symfony\Bridge\Doctrine\Form\Type\EntityType;
  10. use Symfony\Component\Validator\Constraints as Assert;
  11. use Symfony\Component\Form\Extension\Core\Type\TextType;
  12. class ResetPasswordRequestFormType extends AbstractType
  13. {
  14.     public function buildForm(FormBuilderInterface $builder, array $options): void
  15.     {
  16.         $builder
  17.             ->add('email',TextType::class,array(
  18.                 'constraints' => array(
  19.                     new Assert\NotBlank(),
  20.                     new Assert\Email(),
  21.                 ) 
  22.             ))
  23.             ;
  24.         
  25.     }
  26.     public function configureOptions(OptionsResolver $resolver): void
  27.     {
  28.         $resolver->setDefaults([]);
  29.     }
  30. }