diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/internals/deprecation.txt | 2 | ||||
| -rw-r--r-- | docs/ref/forms/fields.txt | 11 | ||||
| -rw-r--r-- | docs/releases/1.8.txt | 6 |
3 files changed, 15 insertions, 4 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index f1cdfdb6be..795e46f8f0 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -40,6 +40,8 @@ about each item can often be found in the release notes of two versions prior. * ``django.template.resolve_variable`` will be removed. +* The ``error_message`` argument of ``django.forms.RegexField`` will be removed. + .. _deprecation-removed-in-1.9: 1.9 diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt index e92013a832..7dd0510237 100644 --- a/docs/ref/forms/fields.txt +++ b/docs/ref/forms/fields.txt @@ -805,10 +805,13 @@ For each field, we describe the default widget used if you don't specify Also takes ``max_length`` and ``min_length``, which work just as they do for ``CharField``. - The optional argument ``error_message`` is also accepted for backwards - compatibility. The preferred way to provide an error message is to use the - ``error_messages`` argument, passing a dictionary with ``'invalid'`` as a key - and the error message as the value. + .. deprecated:: 1.8 + + The optional argument ``error_message`` is also accepted for backwards + compatibility but will be removed in Django 2.0. The preferred way to + provide an error message is to use the :attr:`~Field.error_messages` + argument, passing a dictionary with ``'invalid'`` as a key and the error + message as the value. ``SlugField`` ~~~~~~~~~~~~~ diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt index a03b37c505..07dd783d0b 100644 --- a/docs/releases/1.8.txt +++ b/docs/releases/1.8.txt @@ -625,3 +625,9 @@ The function has been informally marked as "Deprecated" for some time. Replace It provided the :ttag:`lorem` template tag which is now included in the built-in tags. Simply remove ``'django.contrib.webdesign'`` from :setting:`INSTALLED_APPS` and ``{% load webdesign %}`` from your templates. + +``error_message`` argument to ``django.forms.RegexField`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +It provided backwards compatibility for pre-1.0 code, but its functionality is +redundant. Use ``Field.error_messages['invalid']`` instead. |
