#30162: Model error_message 'required' gets overridden by default_error_message
-------------------------------------+-------------------------------------
Reporter: Oskar Haller | Owner: nobody
Type: Bug | Status: closed
Component: Forms | Version: 2.1
Severity: Normal | Resolution: duplicate
Keywords: custom model | Triage Stage:
error_messages overwritten | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):
* status: new => closed
* resolution: => duplicate
* component: Uncategorized => Forms
Comment:
[https://docs.djangoproject.com/en/dev/topics/forms/modelforms
/#considerations-regarding-model-s-error-messages It's documented]:
Error messages defined on model fields are only used when the
ValidationError is raised during the model validation step and no
corresponding error messages are defined at the form level.
Changing the behavior would be backwards incompatible. If you want to
propose changing it, try putting together a patch and presenting a
proposal on the DevelopersMailingList. That said, the rationale at
ticket:22105#comment:1 makes sense to me so I'm not sure that a proposal
has much chance of success.
I'd ask that you not create duplicate tickets (of #22105 in this case) and
instead use DevelopersMailingList for design decision reconsiderations.
--
Ticket URL: <https://code.djangoproject.com/ticket/30162#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 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/062.712c02fa95e5bcf44667591df64ae3f4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.