Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9fa31e7

Browse files
committed
minor#16771 [Validator] Fix typo in the Unique constraint (wkania)
This PR was merged into the 6.1 branch.Discussion----------[Validator] Fix typo in the Unique constraint`@wouterj` just a small fix related to the#16713 (comment)Commits-------3fd53b9 Fix typo in the Unique constraint
2 parents1cbcf11 +3fd53b9 commit9fa31e7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎reference/constraints/Unique.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ collection::
157157
# config/validator/validation.yaml
158158
App\Entity\Poi:
159159
properties:
160-
contactEmails:
160+
coordinates:
161161
-Unique:
162162
fields:[latitude, longitude]
163163
@@ -172,8 +172,10 @@ collection::
172172
<classname="App\Entity\Poi">
173173
<propertyname="coordinates">
174174
<constraintname="Unique">
175-
<field>latitude</field>
176-
<field>longitude</field>
175+
<optionname="fields">
176+
<value>latitude</value>
177+
<value>longitude</value>
178+
</option>
177179
</constraint>
178180
</property>
179181
</class>
@@ -191,7 +193,7 @@ collection::
191193
{
192194
public static function loadValidatorMetadata(ClassMetadata $metadata)
193195
{
194-
$metadata->addPropertyConstraint('contactEmails', new Assert\Unique([
196+
$metadata->addPropertyConstraint('coordinates', new Assert\Unique([
195197
'fields' => ['latitude', 'longitude'],
196198
]));
197199
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp