vendor/symfony/form/Extension/Core/Type/EmailType.php line 17

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Symfony package.
  4.  *
  5.  * (c) Fabien Potencier <fabien@symfony.com>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. namespace Symfony\Component\Form\Extension\Core\Type;
  11. use Symfony\Component\Form\AbstractType;
  12. use Symfony\Component\OptionsResolver\OptionsResolver;
  13. class EmailType extends AbstractType
  14. {
  15.     /**
  16.      * {@inheritdoc}
  17.      */
  18.     public function configureOptions(OptionsResolver $resolver)
  19.     {
  20.         $resolver->setDefaults([
  21.             'invalid_message' => 'Please enter a valid email address.',
  22.         ]);
  23.     }
  24.     /**
  25.      * {@inheritdoc}
  26.      */
  27.     public function getParent(): ?string
  28.     {
  29.         return TextType::class;
  30.     }
  31.     /**
  32.      * {@inheritdoc}
  33.      */
  34.     public function getBlockPrefix(): string
  35.     {
  36.         return 'email';
  37.     }
  38. }