In New Custom Fields add Type Email for Validation #10990

Closed
opened 2025-12-29 21:38:52 +01:00 by adam · 2 comments
Owner

Originally created by @the-cox on GitHub (Apr 7, 2025).

NetBox version

v4.2.6

Feature type

Other

Proposed functionality

Create a type of data "email" in custom filed creation

Use case

I wanted to create a custom field for group email address in group-contacts - as type of text and Validation regex for Email, none of my regex was acceppted.
Make sure when custom fields for emailaddresses will be added, that only email-addresses in valid format could be inserted

Database changes

No response

External dependencies

No response

Originally created by @the-cox on GitHub (Apr 7, 2025). ### NetBox version v4.2.6 ### Feature type Other ### Proposed functionality Create a type of data "email" in custom filed creation ### Use case I wanted to create a custom field for group email address in group-contacts - as type of text and Validation regex for Email, none of my regex was acceppted. Make sure when custom fields for emailaddresses will be added, that only email-addresses in valid format could be inserted ### Database changes _No response_ ### External dependencies _No response_
adam added the type: feature label 2025-12-29 21:38:52 +01:00
adam closed this issue 2025-12-29 21:38:52 +01:00
Author
Owner

@stavr666 commented on GitHub (Apr 8, 2025):

[^@]+@[^@]+\.[^@]+

Working well in demo.

@stavr666 commented on GitHub (Apr 8, 2025): `[^@]+@[^@]+\.[^@]+` Working well in demo.
Author
Owner

@jeremystretch commented on GitHub (Apr 10, 2025):

We've opted not to add custom fields specified to certain data formats for the simple reason that it would introduce a myriad of new field types. While it's possible to achieve this functionality using a regex (as pointed out above), I'd argue that what you really want is some mechanism for associating a custom field with some form of canonical validator. This might be worth raising in a discussion and ultimately a new feature request.

@jeremystretch commented on GitHub (Apr 10, 2025): We've opted not to add custom fields specified to certain data formats for the simple reason that it would introduce a myriad of new field types. While it's possible to achieve this functionality using a regex (as pointed out above), I'd argue that what you really want is some mechanism for associating a custom field with some form of canonical validator. This might be worth raising in a discussion and ultimately a new feature request.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10990