Fixed #23639 -- Fixed doc error in RegexValidator.regex

Thanks to @claudep for the report and the original patch.
This commit is contained in:
Dori 2014-10-12 12:50:18 +01:00 committed by Baptiste Mispelon
parent bc46e4d4fa
commit c48a29a02a
1 changed files with 6 additions and 4 deletions

View File

@ -81,11 +81,13 @@ to, or in lieu of custom ``field.clean()`` methods.
.. attribute:: regex .. attribute:: regex
The regular expression pattern to search for the provided ``value``, The regular expression pattern to search for the provided ``value``,
or a pre-compiled regular expression. Raises a or a pre-compiled regular expression. By default, raises a
:exc:`~django.core.exceptions.ValidationError` with :attr:`message` :exc:`~django.core.exceptions.ValidationError` with :attr:`message`
and :attr:`code` if :attr:`inverse_match` is ``False`` and a match is and :attr:`code` if a match is not found. That standard behavior can
found, or if :attr:`inverse_match` is ``True`` and a match is not found. be reversed by setting :attr:`inverse_match` to ``True``, in which case
By default, matches any string (including an empty string). the :exc:`~django.core.exceptions.ValidationError` is raised when a
match **is** found. By default, matches any string (including an empty
string).
.. attribute:: message .. attribute:: message