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

 * status:  closed => new
 * resolution:  wontfix =>


Comment:

 It can be done in a clean way.
 You can do it by small rewrite of ErrorList (form Error classes in
 general). It have to accept additional param on __init__, the params from
 ValidationError or even whole Exception (for custom exceptions handling).
 Then you can change the form behaviour by passing custom error_class param
 to your Form, and handle this additional param in your custom ErrorList.

 But it's not backward compatible for old custom classes. It could be if
 you would create new base class for ErrorList and check it by instanceof,
 keeping old behaviour too.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19592#comment:2>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to