mirror of
https://github.com/django/django.git
synced 2025-11-18 02:56:45 +00:00
Fixes #13511 -- make regex parameter to RegexValidator to be optional. Also tidies up related docs (parameters aren't attributes). Thanks for the patch work, davidfischer.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16351 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
db2f9bfae1
commit
b56ef75088
3 changed files with 28 additions and 14 deletions
|
|
@ -112,6 +112,11 @@ TEST_DATA = (
|
|||
(BaseValidator(True), True, None),
|
||||
(BaseValidator(True), False, ValidationError),
|
||||
|
||||
(RegexValidator(), '', None),
|
||||
(RegexValidator(), 'x1x2', None),
|
||||
(RegexValidator('[0-9]+'), 'xxxxxx', ValidationError),
|
||||
(RegexValidator('[0-9]+'), '1234', None),
|
||||
(RegexValidator(re.compile('[0-9]+')), '1234', None),
|
||||
(RegexValidator('.*'), '', None),
|
||||
(RegexValidator(re.compile('.*')), '', None),
|
||||
(RegexValidator('.*'), 'xxxxx', None),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue