File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff 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 <class name =" App\Entity\Poi" >
173173 <property name =" coordinates" >
174174 <constraint name =" Unique" >
175- <field >latitude</field >
176- <field >longitude</field >
175+ <option name =" 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 }
You can’t perform that action at this time.
0 commit comments