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

  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.     public function configureOptions(OptionsResolver $resolver)
  16.     {
  17.         $resolver->setDefaults([
  18.             'invalid_message' => 'Please enter a valid email address.',
  19.         ]);
  20.     }
  21.     public function getParent(): ?string
  22.     {
  23.         return TextType::class;
  24.     }
  25.     public function getBlockPrefix(): string
  26.     {
  27.         return 'email';
  28.     }
  29. }