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

Method validate

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

Source from the content-addressed store, hash-verified

436 return value
437
438 def validate(self, value):
439 super().validate(value)
440 if value in self.empty_values:
441 return
442 if not value.is_finite():
443 raise ValidationError(
444 self.error_messages["invalid"],
445 code="invalid",
446 params={"value": value},
447 )
448
449 def widget_attrs(self, widget):
450 attrs = super().widget_attrs(widget)

Callers

nothing calls this directly

Calls 2

ValidationErrorClass · 0.90
validateMethod · 0.45

Tested by

no test coverage detected