From 3fd53b98d165e68d7f92de727529ae8619593f1a Mon Sep 17 00:00:00 2001 From: Wojciech Kania Date: Tue, 3 May 2022 09:25:25 +0200 Subject: [PATCH] Fix typo in the Unique constraint --- reference/constraints/Unique.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/reference/constraints/Unique.rst b/reference/constraints/Unique.rst index 4e24a5f8b3b..45212679259 100644 --- a/reference/constraints/Unique.rst +++ b/reference/constraints/Unique.rst @@ -157,7 +157,7 @@ collection:: # config/validator/validation.yaml App\Entity\Poi: properties: - contactEmails: + coordinates: - Unique: fields: [latitude, longitude] @@ -172,8 +172,10 @@ collection:: - latitude - longitude + @@ -191,7 +193,7 @@ collection:: { public static function loadValidatorMetadata(ClassMetadata $metadata) { - $metadata->addPropertyConstraint('contactEmails', new Assert\Unique([ + $metadata->addPropertyConstraint('coordinates', new Assert\Unique([ 'fields' => ['latitude', 'longitude'], ])); }