DynamicModelChoiceField does not propagate required error in UI #1406

Closed
opened 2026-04-06 00:48:58 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @arthanson on 8/22/2025

Deployment Type

Self-hosted

NetBox Version

v4.3.6

Python Version

3.12

Steps to Reproduce

The easiest way to show this is to modify NetBox code as there currently isn't a case where we use DynamicModelChoiceField with required.

  1. Go into netbox.dcim.forms.model_forms.SiteForm for the region = DynamicModelChoiceField for field change required=False to required=True
  2. Add a new site, set the name, slug and status. Note that Region correctly shows that it is required - don't fill anything in for Region.
  3. Click Create

Expected Behavior

The for should error and the Region field should be highlighted in red and "This field is required" should be shown below it.

Observed Behavior

The form doesn't submit, but there is no indication of why it didn't submit. There is no highlight or indication that the Region field is the problem.

*Originally created by @arthanson on 8/22/2025* ### Deployment Type Self-hosted ### NetBox Version v4.3.6 ### Python Version 3.12 ### Steps to Reproduce The easiest way to show this is to modify NetBox code as there currently isn't a case where we use DynamicModelChoiceField with required. 1. Go into netbox.dcim.forms.model_forms.SiteForm for the `region = DynamicModelChoiceField` for field change `required=False` to `required=True` 2. Add a new site, set the name, slug and status. Note that Region correctly shows that it is required - don't fill anything in for Region. 3. Click Create ### Expected Behavior The for should error and the Region field should be highlighted in red and "This field is required" should be shown below it. ### Observed Behavior The form doesn't submit, but there is no indication of why it didn't submit. There is no highlight or indication that the Region field is the problem.
MrUnknownDE added the status: duplicatetype: bugstatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatestatus: duplicatetype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bugtype: bug labels 2026-04-06 00:49:47 +02:00
Sign in to join this conversation.
No Label status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate status: duplicate type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug type: bug
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#1406