Allow non-custom fields to be required fields #1566

Closed
opened 2025-12-29 16:33:01 +01:00 by adam · 3 comments
Owner

Originally created by @ryanmerolle on GitHub (Feb 21, 2018).

Issue type

[x] Feature request
[ ] Bug report
[ ] Documentation

Please allow non-custom fields to be required fields

  • This is currently enabled for custom fields, please allow the same in the settings for non-custom fields.
  • This likely requires enhancements to the overall netbox admin tooling and may require foundational work complete here first.
  • This could eventually be important for 3rd party integrations where for example the project or bespoke script wants to take the netbox inventory and execute some function based on the platform of the asset (ie JUNOS, IOS, EOS, etc.).
  • As an example, this would likely help netconfig in requiring users to associate a platform.
Originally created by @ryanmerolle on GitHub (Feb 21, 2018). ### Issue type [x] Feature request <!-- An enhancement of existing functionality --> [ ] Bug report <!-- Unexpected or erroneous behavior --> [ ] Documentation <!-- A modification to the documentation --> Please allow non-custom fields to be required fields - This is currently enabled for custom fields, please allow the same in the settings for non-custom fields. - This likely requires enhancements to the overall netbox admin tooling and may require foundational work complete here first. - This could eventually be important for 3rd party integrations where for example the project or bespoke script wants to take the netbox inventory and execute some function based on the platform of the asset (ie JUNOS, IOS, EOS, etc.). - As an example, this would likely help [netconfig](https://github.com/v1tal3/netconfig) in requiring users to associate a platform.
adam closed this issue 2025-12-29 16:33:01 +01:00
Author
Owner

@jeremystretch commented on GitHub (Feb 21, 2018):

It's easy to toggle this for custom fields because the field itself is defined as a row in the database, and mandatory status is saved in the required column. For built-in fields, mandatory status depends on a constraint placed on the object's table, and validation is performed at the database layer.

I currently struggle with getting people to consistently assign (optional) prefix roles, so I know where you're coming from, but trying to shimmy in a second layer of validation which allows users to designate arbitrary fields as required seems like a lot more work than it's worth.

@jeremystretch commented on GitHub (Feb 21, 2018): It's easy to toggle this for custom fields because the field itself is defined as a row in the database, and mandatory status is saved in the `required` column. For built-in fields, mandatory status depends on a constraint placed on the object's table, and validation is performed at the database layer. I currently struggle with getting people to consistently assign (optional) prefix roles, so I know where you're coming from, but trying to shimmy in a second layer of validation which allows users to designate arbitrary fields as required seems like a lot more work than it's worth.
Author
Owner

@ryanmerolle commented on GitHub (Feb 21, 2018):

Yea I get the issue, I would have figured the data model for built-in fields would eventually be more streamlined to the way custom fields are setup.

I should have looked at the data model, but I just fired the issue out. There are likely bigger ROIs at this point.

@ryanmerolle commented on GitHub (Feb 21, 2018): Yea I get the issue, I would have figured the data model for built-in fields would eventually be more streamlined to the way custom fields are setup. I should have looked at the data model, but I just fired the issue out. There are likely bigger ROIs at this point.
Author
Owner

@jeremystretch commented on GitHub (Feb 21, 2018):

I'm going to close this out as I think it would amount to a major feature request and we've already got quite the backlog, but I'll keep it in the back of my mind moving forward in case an opportunity presents itself.

@jeremystretch commented on GitHub (Feb 21, 2018): I'm going to close this out as I think it would amount to a major feature request and we've already got quite the backlog, but I'll keep it in the back of my mind moving forward in case an opportunity presents itself.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1566