Skip to content
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...
1 parent 66e0485 commit 341d1eb022a694a185651af514e65856fed17938 @adrianholovaty adrianholovaty committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/core/validators.py
View
2 django/core/validators.py
@@ -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:

0 comments on commit 341d1eb

Please sign in to comment.
Something went wrong with that request. Please try again.