@@ -36,7 +36,7 @@ between all of the constraints in your user table:
36
36
37
37
.. code-block :: php-annotations
38
38
39
- // src/Entity/Author .php
39
+ // src/Entity/User .php
40
40
namespace App\Entity;
41
41
42
42
use Symfony\Component\Validator\Constraints as Assert;
@@ -49,7 +49,7 @@ between all of the constraints in your user table:
49
49
* @ORM\Entity
50
50
* @UniqueEntity("email")
51
51
*/
52
- class Author
52
+ class User
53
53
{
54
54
/**
55
55
* @ORM\Column(name="email", type="string", length=255, unique=true)
@@ -61,7 +61,7 @@ between all of the constraints in your user table:
61
61
.. code-block :: yaml
62
62
63
63
# config/validator/validation.yaml
64
- App\Entity\Author :
64
+ App\Entity\User :
65
65
constraints :
66
66
- Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity : email
67
67
properties :
@@ -76,7 +76,7 @@ between all of the constraints in your user table:
76
76
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
77
77
xsi : schemaLocation =" http://symfony.com/schema/dic/constraint-mapping https://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd" >
78
78
79
- <class name =" App\Entity\Author " >
79
+ <class name =" App\Entity\User " >
80
80
<constraint name =" Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity" >
81
81
<option name =" fields" >email</option >
82
82
</constraint >
@@ -88,15 +88,15 @@ between all of the constraints in your user table:
88
88
89
89
.. code-block :: php
90
90
91
- // src/Entity/Author .php
91
+ // src/Entity/User .php
92
92
namespace App\Entity;
93
93
94
94
use Symfony\Component\Validator\Constraints as Assert;
95
95
96
96
// DON'T forget this use statement!!!
97
97
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
98
98
99
- class Author
99
+ class User
100
100
{
101
101
public static function loadValidatorMetadata(ClassMetadata $metadata)
102
102
{
0 commit comments