mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 01:41:22 -06:00
Closes #10529: Run validation on each value of a multi-value filter
This commit is contained in:
parent
d486fa8452
commit
ada5c58acf
@ -23,6 +23,14 @@ def multivalue_field_factory(field_class):
|
|||||||
field.to_python(v) for v in value if v
|
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())
|
return type('MultiValue{}'.format(field_class.__name__), (NewField,), dict())
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user