MCPcopy
hub / github.com/django/django / validate

Method validate

django/forms/fields.py:185–187  ·  view source on GitHub ↗
(self, value)

Source from the content-addressed store, hash-verified

183 return value
184
185 def validate(self, value):
186 if value in self.empty_values and self.required:
187 raise ValidationError(self.error_messages["required"], code="required")
188
189 def run_validators(self, value):
190 if value in self.empty_values:

Callers 5

cleanMethod · 0.95
validateMethod · 0.45
validateMethod · 0.45
validateMethod · 0.45
validateMethod · 0.45

Calls 1

ValidationErrorClass · 0.90

Tested by

no test coverage detected