#19592: BaseForms validation and ValidationError's params
-----------------------------+------------------------------------
     Reporter:  cgenie@…     |                    Owner:  nobody
         Type:  New feature  |                   Status:  closed
    Component:  Forms        |                  Version:  1.4
     Severity:  Normal       |               Resolution:  wontfix
     Keywords:               |             Triage Stage:  Accepted
    Has patch:  0            |      Needs documentation:  0
  Needs tests:  0            |  Patch needs improvement:  0
Easy pickings:  0            |                    UI/UX:  0
-----------------------------+------------------------------------
Changes (by carljm):

 * status:  new => closed
 * resolution:   => wontfix
 * stage:  Unreviewed => Accepted


Comment:

 I think a more reasonable change here would be to add a documented public
 `add_error` API on form classes, and have `_clean_fields` call that
 instead of doing `self._errors[name] = self.error_class(e.messages)`
 (which would be the default implementation of `add_error`.

 It surprises me that we have all that documentation on stuffing things
 into `form._errors` directly; it would be a better if we changed that
 documentation to use a real API. And the side benefit would be that by
 overriding `add_error` and specifying a custom `error_class`, you could do
 everything that's been discussed here, without having to make ugly changes
 in core Django with potential backwards-compatibility implications.

 I'm going to re-close this as wontfix (because I am also -1 on the change
 as it has been presented in this ticket) rather than totally hacking up
 the title and description to reflect my alternative approach. If anyone
 following this ticket is motivated to make the change as I've described
 it, please open a new ticket for that and link it from here for
 posterity's sake.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19592#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to