mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #32347 -- Made ModelChoiceField include the value in ValidationError for invalid_choice.
This commit is contained in:
parent
42e8cf47c7
commit
1adc09064f
5 changed files with 32 additions and 2 deletions
|
@ -135,7 +135,11 @@ File Uploads
|
|||
Forms
|
||||
~~~~~
|
||||
|
||||
* ...
|
||||
* :class:`~django.forms.ModelChoiceField` now includes the provided value in
|
||||
the ``params`` argument of a raised
|
||||
:exc:`~django.core.exceptions.ValidationError` for the ``invalid_choice``
|
||||
error message. This allows custom error messages to use the ``%(value)s``
|
||||
placeholder.
|
||||
|
||||
Generic Views
|
||||
~~~~~~~~~~~~~
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue