mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user