Skip to content

Commit c7c5959

Browse files
author
Robin Weller
committed
fixed argument order for UniqueEntity
1 parent a5977ce commit c7c5959

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

reference/constraints/UniqueEntity.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ Consider this example:
211211
* @ORM\Entity
212212
* @UniqueEntity(
213213
* fields={"host", "port"},
214-
* errorPath="port",
215-
* message="This port is already in use on that host."
214+
* message="This port is already in use on that host.",
215+
* errorPath="port"
216216
* )
217217
*/
218218
class Service
@@ -240,8 +240,8 @@ Consider this example:
240240
#[ORM\Entity]
241241
#[UniqueEntity(
242242
fields: ['host', 'port'],
243-
errorPath: 'port',
244243
message: 'This port is already in use on that host.',
244+
errorPath: 'port',
245245
)]
246246
class Service
247247
{
@@ -259,8 +259,8 @@ Consider this example:
259259
constraints:
260260
- Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity:
261261
fields: [host, port]
262-
errorPath: port
263262
message: 'This port is already in use on that host.'
263+
errorPath: port
264264
265265
.. code-block:: xml
266266
@@ -276,8 +276,8 @@ Consider this example:
276276
<value>host</value>
277277
<value>port</value>
278278
</option>
279-
<option name="errorPath">port</option>
280279
<option name="message">This port is already in use on that host.</option>
280+
<option name="errorPath">port</option>
281281
</constraint>
282282
</class>
283283
@@ -300,8 +300,8 @@ Consider this example:
300300
{
301301
$metadata->addConstraint(new UniqueEntity([
302302
'fields' => ['host', 'port'],
303-
'errorPath' => 'port',
304303
'message' => 'This port is already in use on that host.',
304+
'errorPath' => 'port',
305305
]));
306306
}
307307
}

0 commit comments

Comments
 (0)