Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #1550 -- Changed MatchesRegularExpression validator to use .sea…

…rch(), not .match(). Thanks, Gary Wilson

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2588 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 341d1eb022a694a185651af514e65856fed17938 1 parent 66e0485
Adrian Holovaty adrianholovaty authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/core/validators.py
2  django/core/validators.py
View
@@ -379,7 +379,7 @@ def __init__(self, regexp, error_message=gettext_lazy("The format for this field
self.error_message = error_message
def __call__(self, field_data, all_data):
- if not self.regexp.match(field_data):
+ if not self.regexp.search(field_data):
raise ValidationError(self.error_message)
class AnyValidator:
Please sign in to comment.
Something went wrong with that request. Please try again.