-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
severity: mediumResults in substantial degraded or broken functionality for specfic workflowsResults in substantial degraded or broken functionality for specfic workflowsstatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
NetBox version
v3.6.1
Python version
3.8
Steps to Reproduce
- Create Custom Validator
EX:
from extras.validators import CustomValidator
class cvReservationMAC(CustomValidator):
def validate(self, instance):
if instance.status == 'dhcp' and not instance.cf["MAC_Address"]:
self.fail("DHCP Reservations must have Mac Address!", field='cf_MAC_Address')
class cvReservationDNSName(CustomValidator):
def validate(self, instance):
if instance.status == 'dhcp' and not instance.dns_name:
self.fail("DHCP Reservations must have DNS Name!", field='dns_name')
CUSTOM_VALIDATORS = {
'ipam.ipaddress': (
cvReservationMAC(),
cvReservationDNSName(),
)
}
- Open menu "Admin >> Current Config" Click on Edit
Expected Behavior
Edit config context appears
Observed Behavior
Metadata
Metadata
Assignees
Labels
severity: mediumResults in substantial degraded or broken functionality for specfic workflowsResults in substantial degraded or broken functionality for specfic workflowsstatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
