Skip to content
Snippets Groups Projects
Commit 481d8e32 authored by Camille Simiand's avatar Camille Simiand
Browse files

Fix registration redirects to error page when invalid email submitted

parent b1ae0bba
No related branches found
No related tags found
1 merge request!24Fix registration redirects to error page when invalid email submitted
...@@ -8,6 +8,7 @@ use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; ...@@ -8,6 +8,7 @@ use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Security\Core\User\LegacyPasswordAuthenticatedUserInterface; use Symfony\Component\Security\Core\User\LegacyPasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\UserInterface; use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Validator\Constraints as Assert;
/** /**
* @ORM\Entity(repositoryClass=UserRepository::class) * @ORM\Entity(repositoryClass=UserRepository::class)
...@@ -25,6 +26,7 @@ class User implements UserInterface, LegacyPasswordAuthenticatedUserInterface ...@@ -25,6 +26,7 @@ class User implements UserInterface, LegacyPasswordAuthenticatedUserInterface
/** /**
* @ORM\Column(type="string", length=255) * @ORM\Column(type="string", length=255)
* @Assert\Email(message = "The email {{ value }} is not a valid email.")
*/ */
private $email; private $email;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment