#20199: Allow ModelForm to override error messages defined in model fields. -----------------------------+------------------------------------ Reporter: loic84 | Owner: nobody Type: New feature | Status: new Component: Forms | Version: master Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -----------------------------+------------------------------------ Changes (by loic84):
* has_patch: 0 => 1 Comment: To address this issue we need to bubble up error codes and error params which are currently lost before they reach the `ModelForm`. The fact that we don't keep track of `ValidationError` instances is actually a broader problem than this `ModelForm` issue. I've attempted a refactor of `ValidationError` that aims to address that. It's a tricky issue because of backward compatibility, but the proposed solution should remain compatible. It keeps track of the individual instances of `ValidationError` while keeping the previous API of `ValidationError.message_dict` and `ValidationError.messages`. The Django test suite currently pass without errors. https://github.com/loic/django/compare/ticket20199 -- Ticket URL: <https://code.djangoproject.com/ticket/20199#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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.