mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Fixed #18409 -- Made RegexField work with unicode characters.
This commit is contained in:
@@ -446,7 +446,7 @@ class RegexField(CharField):
|
||||
|
||||
def _set_regex(self, regex):
|
||||
if isinstance(regex, basestring):
|
||||
regex = re.compile(regex)
|
||||
regex = re.compile(regex, re.UNICODE)
|
||||
self._regex = regex
|
||||
if hasattr(self, '_regex_validator') and self._regex_validator in self.validators:
|
||||
self.validators.remove(self._regex_validator)
|
||||
|
||||
Reference in New Issue
Block a user