1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Closes #10529: Run validation on each value of a multi-value filter

This commit is contained in:
jeremystretch
2022-09-30 15:05:13 -04:00
parent d486fa8452
commit ada5c58acf

View File

@@ -23,6 +23,14 @@ def multivalue_field_factory(field_class):
field.to_python(v) for v in value if v
]
def run_validators(self, value):
for v in value:
super().run_validators(v)
def validate(self, value):
for v in value:
super().validate(v)
return type('MultiValue{}'.format(field_class.__name__), (NewField,), dict())