Skip to content

Commit 2c1f607

Browse files
committed
Merge branch '7.1' into 7.2
* 7.1: Minor reword [Validator] Add note to `version` option in `Cidr` constraint
2 parents 422ce06 + 5773975 commit 2c1f607

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

reference/constraints/Cidr.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,14 @@ Parameter Description
126126
This determines exactly *how* the CIDR notation is validated and can take one
127127
of :ref:`IP version ranges <reference-constraint-ip-version>`.
128128

129+
.. note::
130+
131+
The IP range checks (e.g., ``*_private``, ``*_reserved``) validate only the
132+
IP address, not the entire netmask. To improve validation, you can set the
133+
``{{ min }}`` value for the netmask. For example, the range ``9.0.0.0/6`` is
134+
considered ``*_public``, but it also includes the ``10.0.0.0/8`` range, which
135+
is categorized as ``*_private``.
136+
129137
.. versionadded:: 7.1
130138

131139
The support of all IP version ranges was introduced in Symfony 7.1.

0 commit comments

Comments
 (0)