Skip to content

Commit

Permalink
minor #19784 [Validator] Add support for types (ALL*, LOCAL_*, `U…
Browse files Browse the repository at this point in the history
…NIVERSAL_*`, `UNICAST_*`, `MULTICAST_*`, `BROADCAST`) in `MacAddress` constraint (Ninos)

This PR was merged into the 7.1 branch.

Discussion
----------

[Validator] Add support for types (`ALL*`, `LOCAL_*`, `UNIVERSAL_*`, `UNICAST_*`, `MULTICAST_*`, `BROADCAST`) in `MacAddress` constraint

See also following pull request:
symfony/symfony#54473

Commits
-------

0ed185a [Validator] Add support for types (`ALL*`, `LOCAL_*`, `UNIVERSAL_*`, `UNICAST_*`, `MULTICAST_*`, `BROADCAST`) in `MacAddress` constraint
  • Loading branch information
javiereguiluz committed Apr 15, 2024
2 parents 68d6b11 + 0ed185a commit 28abe15
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions reference/constraints/MacAddress.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,33 @@ Parameter Description

.. include:: /reference/constraints/_payload-option.rst.inc

.. _reference-constraint-mac-address-type:

``type``
~~~~~~~~

**type**: ``string`` **default**: ``all``

This determines exactly *how* the MAC address is validated. This option defines a
lot of different possible values based on the type of MAC address that you want to allow/deny:

================================ ==============================================================
Parameter Description
================================ ==============================================================
``all`` All
``all_no_broadcast`` All except broadcast
``local_all`` Only local
``local_no_broadcast`` Only local except broadcast
``local_unicast`` Only local and unicast
``local_multicast`` Only local and multicast
``local_multicast_no_broadcast`` Only local and multicast except broadcast
``universal_all`` Only universal
``universal_unicast`` Only universal and unicast
``universal_multicast`` Only universal and multicast
``unicast_all`` Only unicast
``multicast_all`` Only multicast
``multicast_no_broadcast`` Only multicast except broadcast
``broadcast`` Only broadcast
=============== ==============================================================

.. _`MAC address`: https://en.wikipedia.org/wiki/MAC_address

0 comments on commit 28abe15

Please sign in to comment.