Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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