Skip to content

Commit 823c693

Browse files
committed
[Validator] Add note to version option in Cidr constraint
1 parent 4937afb commit 823c693

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

reference/constraints/Cidr.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@ 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+
Be aware IP range (``*_private``, ``*_reserved``) is only validating against IP, but not the whole
132+
netmask. You need to set the ``{{ min }}`` value for the netmask to harden the validation a bit.
133+
For example, ``9.0.0.0/6`` results to be ``*_public``, but also uses ``10.0.0.0/8`` range (``*_private``).
134+
129135
.. versionadded:: 7.1
130136

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

0 commit comments

Comments
 (0)