From 341d1eb022a694a185651af514e65856fed17938 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Tue, 28 Mar 2006 21:39:15 +0000 Subject: [PATCH] Fixed #1550 -- Changed MatchesRegularExpression validator to use .search(), not .match(). Thanks, Gary Wilson git-svn-id: http://code.djangoproject.com/svn/django/trunk@2588 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/validators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/core/validators.py b/django/core/validators.py index 27ef538c02..88cf6db4e1 100644 --- a/django/core/validators.py +++ b/django/core/validators.py @@ -379,7 +379,7 @@ class MatchesRegularExpression: 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: