Opened 15 years ago

Closed 15 years ago

#12456 closed (fixed)

Make `django.forms.util.ValidationError` and `django.core.exceptions.ValidationError` share ancestry

Reported by: Oliver Beattie Owned by: Honza Král
Component: Forms Version: dev
Severity: Keywords:
Cc: Triage Stage: Fixed on a branch
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

There appears to be two (similarly named) ValidationErrors in Django — one living in django.core, and a form-specific one living in django.forms.util. I can appreciate that they have slightly differing uses, but it does seem like they have a lot in common. So, there would be a few routes one could take here:-

  1. Alias django.forms.util.ValidationError to the django.core one
  1. Make the forms version a subclass of the django.core one
  1. Make each share a common base exception

Given how the exceptions are used, I'd say #2 would seem to make the most sense here, and wouldn't break anything. It's already rather confusing having two similarly-named exceptions, so I couldn't really see it being any more confusing to do this.

Change History (3)

comment:1 by Honza Král, 15 years ago

Owner: changed from nobody to Honza Král

This is fixed in the model-validation branch (#6845) where there is only one ValidationError used throughout Django.

comment:2 by Honza Král, 15 years ago

Triage Stage: UnreviewedFixed on a branch

comment:3 by Honza Král, 15 years ago

Resolution: fixed
Status: newclosed

With model-validation merged, this is fixed in [12098]

Note: See TracTickets for help on using tickets.
Back to Top