#23151 closed Cleanup/optimization (fixed)
Deprecate RegexField.error_message
Reported by: | Baptiste Mispelon | Owned by: | nobody |
---|---|---|---|
Component: | Forms | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
Unlike other fields, RegexField
takes an error_message
argument (as opposed to the error_messages
argument other fields take).
It seems this was done to maintain backwards compatibility with the pre-1.0 releases [1].
This argument is documented (and somewhat tested) but the documentation states that this is not the preferred way to do it (the preferred way being to use error_messages={'invalid': '...'}
).
I propose we move through the deprecation procedure and remove that argument altogether.
Note that this feature is still used in django.contrib.flatpages.forms
so this will also need to be changed over to the new and preferred syntax.
I'm marking the ticket as easy_pickings
since the removal should be quite straightforward.
[1] https://github.com/django/django/commit/26ea06b0ab423348e40652dd9e3f530a08b93582#diff-2141c7b3d1c360359d58d724553afd06R377
Change History (6)
comment:1 by , 10 years ago
Has patch: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 10 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Left two minor comments on the PR.
Looks ready for checkin otherwise.
Thanks!
comment:3 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
PR