We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dae3dfe commit 23838fdCopy full SHA for 23838fd
reference/constraints/Unique.rst
@@ -170,6 +170,15 @@ collection::
170
171
.. include:: /reference/constraints/_groups-option.rst.inc
172
173
+``errorPath``
174
+~~~~~~~~~~~~~
175
+
176
+**type**: ``string`` **default**: ``null``
177
178
+This option allows you to define a custom path for your message.
179
+``#[Assert\Unique(fields: ['latitude', 'longitude'], errorPath: 'point_of_interest')]``
180
+Instead of ``0: "Error message"``, it will be : ``0.point_of_interest: "Error message"``
181
182
``message``
183
~~~~~~~~~~~
184
0 commit comments