MCPcopy
hub / github.com/django/django / validate_unique

Method validate_unique

django/forms/models.py:515–524  ·  view source on GitHub ↗

Call the instance's validate_unique() method and update the form's validation errors if any were raised.

(self)

Source from the content-addressed store, hash-verified

513 self.validate_constraints()
514
515 def validate_unique(self):
516 """
517 Call the instance's validate_unique() method and update the form's
518 validation errors if any were raised.
519 """
520 exclude = self._get_validation_exclusions()
521 try:
522 self.instance.validate_unique(exclude=exclude)
523 except ValidationError as e:
524 self._update_errors(e)
525
526 def validate_constraints(self):
527 """

Callers 1

_post_cleanMethod · 0.95

Calls 2

_update_errorsMethod · 0.95

Tested by

no test coverage detected