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'], ])); }