#23639: Doc error in RegexValidator.regex
-------------------------------+------------------------------------
Reporter: claudep | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------
Comment (by claudep):
Suggested patch:
{{{
#!diff
diff --git a/docs/ref/validators.txt b/docs/ref/validators.txt
index 260c066..0b66dd2 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
might
+ be reversed by setting :attr:`inverse_match` to ``True``, meaning
that
+ the :exc:`~django.core.exceptions.ValidationError` is raised when
a
+ match **is** found. By default, matches any string (including an
empty
+ string).
.. attribute:: message
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23639#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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.5aea7ce1605f18306b98738dfd525b9e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.