MCPcopy
hub / github.com/django/django / clean

Method clean

django/forms/fields.py:203–211  ·  view source on GitHub ↗

Validate the given value and return its "cleaned" value as an appropriate Python object. Raise ValidationError for any errors.

(self, value)

Source from the content-addressed store, hash-verified

201 raise ValidationError(errors)
202
203 def clean(self, value):
204 """
205 Validate the given value and return its "cleaned" value as an
206 appropriate Python object. Raise ValidationError for any errors.
207 """
208 value = self.to_python(value)
209 self.validate(value)
210 self.run_validators(value)
211 return value
212
213 def bound_data(self, data, initial):
214 """

Callers 7

_clean_bound_fieldMethod · 0.95
assertFieldOutputMethod · 0.45
cleanMethod · 0.45
cleanMethod · 0.45
cleanMethod · 0.45
cleanMethod · 0.45
cleanMethod · 0.45

Calls 3

to_pythonMethod · 0.95
validateMethod · 0.95
run_validatorsMethod · 0.95

Tested by 1

assertFieldOutputMethod · 0.36