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

Method validate

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

Source from the content-addressed store, hash-verified

383 return value
384
385 def validate(self, value):
386 super().validate(value)
387 if value in self.empty_values:
388 return
389 if not math.isfinite(value):
390 raise ValidationError(self.error_messages["invalid"], code="invalid")
391
392 def widget_attrs(self, widget):
393 attrs = super().widget_attrs(widget)

Callers

nothing calls this directly

Calls 2

ValidationErrorClass · 0.90
validateMethod · 0.45

Tested by

no test coverage detected