8000 [Validator] Add the fields option to the Unique constraint · symfony/symfony-docs@caf3e1f · GitHub
[go: up one dir, main page]

Skip to content

Commit caf3e1f

Browse files
committed
[Validator] Add the fields option to the Unique constraint
1 parent ceaadad commit caf3e1f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

reference/constraints/Unique.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,20 @@ strings:
103103
Options
104104
-------
105105

106+
``fields``
107+
~~~~~~~~~~
108+
109+
**type**: ``array`` | ``string``
110+
111+
112+
.. versionadded:: 6.1
113+
114+
The ``fields`` option was introduced in Symfony 6.1.
115+
116+
This is optional and defines key or keys
117+
in a collection that should be checked for uniqueness.
118+
By default, all collection keys are checked for uniqueness.
119+
106120
.. include:: /reference/constraints/_groups-option.rst.inc
107121

108122
``message``

0 commit comments

Comments
 (0)
0