Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion reference/constraints/Unique.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ If you want to apply any other comparison logic, use the `normalizer`_ option.

========== ===================================================================
Applies to :ref:`property or method <validation-property-target>`
Options - `groups`_
Options - `fields`_
- `groups`_
- `message`_
- `normalizer`_
- `payload`_
Expand Down Expand Up @@ -107,6 +108,20 @@ strings:
Options
-------

``fields``
~~~~~~~~~~

**type**: ``array`` [:ref:`default option <validation-default-option>`]


.. versionadded:: 5.4

The ``fields`` option was introduced in Symfony 5.4.

This is optional and is an array defining all of the
keys in the collection that should be checked for uniqueness.
By default, all collection keys are checked for uniqueness.

.. include:: /reference/constraints/_groups-option.rst.inc

``message``
Expand Down