Allow interface MAC address to accept spaces during input validation #7314

Closed
opened 2025-12-29 20:21:40 +01:00 by adam · 1 comment
Owner

Originally created by @ghost on GitHub (Dec 2, 2022).

NetBox version

v3.4-beta1

Python version

3.8

Steps to Reproduce

Add a MAC address value to an interface
The following formats are accepted

00:12:37:F9:5B:7C
00-12-37-F9-5B-7C
001237-F95B7C
001237F95B7C

The following format is not accepted
00 12 37 F9 5B 7C

Expected Behavior

Several devices output their MAC address with spaces.
When inputting a MAC address with spaces NetBox should allow the validation and strip whitespaces.

Observed Behavior

When attempting to add a MAC address with spaces in it, the validation fails.
1

Originally created by @ghost on GitHub (Dec 2, 2022). ### NetBox version v3.4-beta1 ### Python version 3.8 ### Steps to Reproduce Add a MAC address value to an interface The following formats are accepted >00:12:37:F9:5B:7C 00-12-37-F9-5B-7C 001237-F95B7C 001237F95B7C The following format is not accepted `00 12 37 F9 5B 7C` ### Expected Behavior Several devices output their MAC address with spaces. When inputting a MAC address with spaces NetBox should allow the validation and strip whitespaces. ### Observed Behavior When attempting to add a MAC address with spaces in it, the validation fails. ![1](https://user-images.githubusercontent.com/119611316/205179639-81955ecf-7c98-4c4b-91c4-e483cbfd48eb.png)
adam closed this issue 2025-12-29 20:21:40 +01:00
Author
Owner

@jeremystretch commented on GitHub (Dec 2, 2022):

The specified format is not supported. If you would like to introduce support for it, please submit a feature request.

@jeremystretch commented on GitHub (Dec 2, 2022): The specified format is not supported. If you would like to introduce support for it, please submit a [feature request](https://github.com/netbox-community/netbox/issues/new?assignees=&labels=type%3A+feature&template=feature_request.yaml).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7314