diff options
| author | Dori <dori.czapari@gmail.com> | 2014-10-12 12:50:18 +0100 |
|---|---|---|
| committer | Baptiste Mispelon <bmispelon@gmail.com> | 2014-10-12 12:59:26 +0100 |
| commit | c48a29a02a457cfdb1cff11009401459ba24e870 (patch) | |
| tree | 71e0b4becd45d52c0b05724611c171ec35b61757 /docs | |
| parent | bc46e4d4fa61eead13fe58048ae646f07d632e4f (diff) | |
Fixed #23639 -- Fixed doc error in RegexValidator.regex
Thanks to @claudep for the report and the original patch.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/validators.txt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/docs/ref/validators.txt b/docs/ref/validators.txt index 260c066151..a3ac7f88ab 100644 --- a/docs/ref/validators.txt +++ b/docs/ref/validators.txt @@ -81,11 +81,13 @@ to, or in lieu of custom ``field.clean()`` methods. .. attribute:: regex 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` - and :attr:`code` if :attr:`inverse_match` is ``False`` and a match is - found, or if :attr:`inverse_match` is ``True`` and a match is not found. - By default, matches any string (including an empty string). + and :attr:`code` if a match is not found. That standard behavior can + be reversed by setting :attr:`inverse_match` to ``True``, in which case + the :exc:`~django.core.exceptions.ValidationError` is raised when a + match **is** found. By default, matches any string (including an empty + string). .. attribute:: message |
