MCPcopy
hub / github.com/django/django / run_validators

Method run_validators

django/contrib/postgres/forms/array.py:86–102  ·  view source on GitHub ↗
(self, value)

Source from the content-addressed store, hash-verified

84 raise ValidationError(errors)
85
86 def run_validators(self, value):
87 super().run_validators(value)
88 errors = []
89 for index, item in enumerate(value):
90 try:
91 self.base_field.run_validators(item)
92 except ValidationError as error:
93 errors.append(
94 prefix_validation_error(
95 error,
96 prefix=self.error_messages["item_invalid"],
97 code="item_invalid",
98 params={"nth": index + 1},
99 )
100 )
101 if errors:
102 raise ValidationError(errors)
103
104 def has_changed(self, initial, data):
105 try:

Callers

nothing calls this directly

Calls 3

prefix_validation_errorFunction · 0.90
ValidationErrorClass · 0.90
appendMethod · 0.45

Tested by

no test coverage detected