Skip to content

Commit d5c0003

Browse files
committed
minor #18447 [Validator] Allow single integer for the versions option of the Uuid constraint (alexandre-daubois)
This PR was merged into the 6.4 branch. Discussion ---------- [Validator] Allow single integer for the `versions` option of the `Uuid` constraint Fix #18443 Commits ------- af6a700 [Validator] Allow single integer for the `versions` option of the `Uuid` constraint
2 parents 54c6b50 + af6a700 commit d5c0003

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

reference/constraints/Uuid.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ will allow alternate input formats like:
114114
``versions``
115115
~~~~~~~~~~~~
116116

117-
**type**: ``int[]`` **default**: ``[1,2,3,4,5,6,7,8]``
117+
**type**: ``int[]|int`` **default**: ``[1,2,3,4,5,6,7,8]``
118118

119119
This option can be used to only allow specific `UUID versions`_ (by default, all
120120
of them are allowed). Valid versions are 1 - 8. Instead of using numeric values,
@@ -133,6 +133,11 @@ you can also use the following PHP constants to refer to each UUID version:
133133

134134
UUID versions 7 and 8 were introduced in Symfony 6.2.
135135

136+
.. versionadded:: 6.4
137+
138+
Using a single integer instead of an integer array for this option
139+
was introduced in Symfony 6.4.
140+
136141
.. _`Universally unique identifier (UUID)`: https://en.wikipedia.org/wiki/Universally_unique_identifier
137142
.. _`RFC 4122`: https://tools.ietf.org/html/rfc4122
138143
.. _`UUID versions`: https://en.wikipedia.org/wiki/Universally_unique_identifier#Versions

0 commit comments

Comments
 (0)