diff --git a/django/core/exceptions.py b/django/core/exceptions.py index 78f6d07cf3..cf4aea0f36 100644 --- a/django/core/exceptions.py +++ b/django/core/exceptions.py @@ -123,6 +123,10 @@ class ValidationError(Exception): @property def message_dict(self): + # Trigger an AttributeError if this ValidationError + # doesn't have an error_dict. + getattr(self, 'error_dict') + return dict(self) @property