#32347: ModelChoiceField does not provide value of invalid choice when raising
ValidationError
------------------------------+----------------------------------------
     Reporter:  Aaron Wiegel  |                    Owner:  Aaron Wiegel
         Type:  Bug           |                   Status:  closed
    Component:  Forms         |                  Version:  3.1
     Severity:  Normal        |               Resolution:  wontfix
     Keywords:                |             Triage Stage:  Unreviewed
    Has patch:  0             |      Needs documentation:  0
  Needs tests:  0             |  Patch needs improvement:  0
Easy pickings:  1             |                    UI/UX:  0
------------------------------+----------------------------------------
Changes (by Carlton Gibson):

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


Comment:

 This message has been the same literally forever
 b2b6fc8e3c78671c8b6af2709358c3213c84d119.

 
[https://github.com/django/django/blob/75182a800a621b7a5b2c0a1f39a56e753b9a58ca/django/forms/fields.py#L802-L810
 Given that ChoiceField passes the value when raising the error], if you
 set [https://docs.djangoproject.com/en/3.1/ref/forms/fields/#error-
 messages error_messages] you should be able to get the result you want.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32347#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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.ac8b3ac054e4fd481569f662661a944d%40djangoproject.com.

Reply via email to