#24988: ValidationError fails to set code
---------------------------------+--------------------------------------
     Reporter:  michaeljohnbarr  |                    Owner:  nobody
         Type:  Bug              |                   Status:  new
    Component:  Core (Other)     |                  Version:  1.8
     Severity:  Normal           |               Resolution:
     Keywords:  ValidationError  |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------
Changes (by timgraham):

 * cc: loic (added)


Comment:

 I think it's preferred to use ValidationErrors as the values of the
 messages dict.
 {{{
 'start': ValidationError_(
     '{start} must come before {end}.'
     params={...},
     code='invalid',
 ),
 'end': ...
 }}}
 The change you suggested makes sense to me, but I'm not sure if we should
 do it. If not, might be helpful to issue a warning or exception rather
 than silently discarding the value from the code parameter.

--
Ticket URL: <https://code.djangoproject.com/ticket/24988#comment:3>
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/073.4597338d91cbbd0eade524ea6f594283%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to