mirror of
https://github.com/django/django.git
synced 2024-11-24 02:47:35 +01:00
Updated validate_slug regular expression in form validation docs.
Outdated since 014247ad19
.
This commit is contained in:
parent
54774e790d
commit
63dbe30d33
@ -254,7 +254,7 @@ Common cases such as validating against an email or a regular expression can be
|
|||||||
handled using existing validator classes available in Django. For example,
|
handled using existing validator classes available in Django. For example,
|
||||||
``validators.validate_slug`` is an instance of
|
``validators.validate_slug`` is an instance of
|
||||||
a :class:`~django.core.validators.RegexValidator` constructed with the first
|
a :class:`~django.core.validators.RegexValidator` constructed with the first
|
||||||
argument being the pattern: ``^[-a-zA-Z0-9_]+$``. See the section on
|
argument being the pattern: ``^[-a-zA-Z0-9_]+\Z``. See the section on
|
||||||
:doc:`writing validators </ref/validators>` to see a list of what is already
|
:doc:`writing validators </ref/validators>` to see a list of what is already
|
||||||
available and for an example of how to write a validator.
|
available and for an example of how to write a validator.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user