Skip to content

Commit eac7d04

Browse files
committed
minor #20550 [Validator] Add note to version option in Cidr constraint (Ninos)
This PR was squashed before being merged into the 7.1 branch. Discussion ---------- [Validator] Add note to `version` option in `Cidr` constraint Added for some may relevant note... Ref: #19503 #19117 Commits ------- bb76fd9 [Validator] Add note to `version` option in `Cidr` constraint
2 parents e844fdb + bb76fd9 commit eac7d04

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+
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)