Custom validation on custom field "integer type" #5859

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

Originally created by @jk-onnet on GitHub (Dec 31, 2021).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.1.3

Python version

3.9

Steps to Reproduce

  1. Attempt to create "Integer" Custom Field named "abcd"

  2. Attempt to set value on minimum value "-1"

  3. Failed (The value must be greater than 0)

  4. Create "Integer" Custom Field named "abcd" on any model (all default)

  5. Modify the value of the custom field through ansible (API??)

  6. Failed (The value must be greater than 0)

I think the problem is related to custom validation? From GUI, if custom field has not set anything, it works as usual. With others, it doesn't due to custom validation introduced?

Expected Behavior

  1. Can set integer custom field minimum value to negative.

  2. Can update integer custom fields to -1 through ansible or API. (this one is inconsistent, I could update in some case (not sure), sometimes not)

Observed Behavior

The value must be greater than 0. GUI error and ansible error (update VM custom fields)

Originally created by @jk-onnet on GitHub (Dec 31, 2021). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.1.3 ### Python version 3.9 ### Steps to Reproduce 1. Attempt to create "Integer" Custom Field named "abcd" 2. Attempt to set value on minimum value "-1" 3. Failed (The value must be greater than 0) 1. Create "Integer" Custom Field named "abcd" on any model (all default) 2. Modify the value of the custom field through ansible (API??) 3. Failed (The value must be greater than 0) I think the problem is related to custom validation? From GUI, if custom field has not set anything, it works as usual. With others, it doesn't due to custom validation introduced? ### Expected Behavior 1. Can set integer custom field minimum value to negative. 2. Can update integer custom fields to -1 through ansible or API. (this one is inconsistent, I could update in some case (not sure), sometimes not) ### Observed Behavior The value must be greater than 0. GUI error and ansible error (update VM custom fields)
adam added the type: bugstatus: accepted labels 2025-12-29 19:33:33 +01:00
adam closed this issue 2025-12-29 19:33:33 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5859