diff --git a/netbox/utilities/forms/widgets.py b/netbox/utilities/forms/widgets.py index c27f3c646..429a111b3 100644 --- a/netbox/utilities/forms/widgets.py +++ b/netbox/utilities/forms/widgets.py @@ -110,6 +110,13 @@ class SelectSpeedWidget(forms.NumberInput): class NumericArrayField(SimpleArrayField): + def clean(self, value): + if value and not self.to_python(value): + raise forms.ValidationError(f'Invalid list ({value}). ' + f'Must be numeric and ranges must be in ascending order') + return super().clean(value) + + def to_python(self, value): if not value: return []