src/Form/ForgotEmailFormType.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Form;
  3. use App\Validator\BrasilCpf;
  4. use Symfony\Component\Form\AbstractType;
  5. use Symfony\Component\Form\Extension\Core\Type\TextType;
  6. use Symfony\Component\Form\FormBuilderInterface;
  7. use Symfony\Component\OptionsResolver\OptionsResolver;
  8. class ForgotEmailFormType extends AbstractType
  9. {
  10.     public function buildForm(FormBuilderInterface $builder, array $options)
  11.     {
  12.         $builder
  13.             ->add('cpf'TextType::class, [
  14.                 'label' => 'NĂºmero do CPF',
  15.                 'constraints' => [
  16.                     new BrasilCpf()
  17.                 ],
  18.             ]);
  19.     }
  20.     public function configureOptions(OptionsResolver $resolver)
  21.     {
  22.         $resolver->setDefaults([
  23.             // Configure your form options here
  24.         ]);
  25.     }
  26. }