From e35d012a0eeef1b6fb7a8969496814de1c2f2e95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sch=C3=A4dlich?= Date: Thu, 11 Apr 2019 17:08:03 +0200 Subject: [PATCH] Corrected class name in example --- reference/constraints/UniqueEntity.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/reference/constraints/UniqueEntity.rst b/reference/constraints/UniqueEntity.rst index 5ab2fe53c0c..394db256afa 100644 --- a/reference/constraints/UniqueEntity.rst +++ b/reference/constraints/UniqueEntity.rst @@ -31,7 +31,7 @@ between all of the constraints in your user table: .. code-block:: php-annotations - // src/Entity/Author.php + // src/Entity/User.php namespace App\Entity; use Symfony\Component\Validator\Constraints as Assert; @@ -44,7 +44,7 @@ between all of the constraints in your user table: * @ORM\Entity * @UniqueEntity("email") */ - class Author + class User { /** * @ORM\Column(name="email", type="string", length=255, unique=true) @@ -56,7 +56,7 @@ between all of the constraints in your user table: .. code-block:: yaml # config/validator/validation.yaml - App\Entity\Author: + App\Entity\User: constraints: - Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity: email properties: @@ -71,7 +71,7 @@ between all of the constraints in your user table: xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping https://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd"> - + @@ -83,7 +83,7 @@ between all of the constraints in your user table: .. code-block:: php - // src/Entity/Author.php + // src/Entity/User.php namespace App\Entity; use Symfony\Component\Validator\Constraints as Assert; @@ -91,7 +91,7 @@ between all of the constraints in your user table: // DON'T forget this use statement!!! use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; - class Author + class User { public static function loadValidatorMetadata(ClassMetadata $metadata) {