Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 227c9a1

Browse files
committed
add versioadded, codereview fixes
1 parent cf698c0 commit 227c9a1

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

reference/constraints/Unique.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ Options
109109

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

112-
``message``
113-
~~~~~~~~~~~
112+
message
113+
~~~~~~~
114114

115115
**type**: ``string`` **default**: ``This collection should contain only unique elements.``
116116

@@ -130,13 +130,17 @@ Parameter Description
130130

131131
**type**: a `PHP callable`_ **default**: ``null``
132132

133+
.. versionadded:: 5.3
134+
135+
The ``normalizer`` option was introduced in Symfony 5.3.
136+
133137
This option allows to define the PHP callable applied to each element of the given collection before
134138
checking if the collection is valid.
135139

136140
For example, you may want to pass the ``'trim'`` string to apply the
137141
:phpfunction:`trim` PHP function to each element of the collection in order to ignore leading and trailing
138142
whitespace during validation.
139143

140-
.. _`PHP callable`: https://www.php.net/callable
141-
142144
.. include:: /reference/constraints/_payload-option.rst.inc
145+
146+
.. _`PHP callable`: https://www.php.net/callable

0 commit comments

Comments
 (0)