Fixed a bug in a RegexValidator error message string interpolation.

- Legacy-Id: 14841
This commit is contained in:
Henrik Levkowetz 2018-03-17 13:09:58 +00:00
parent e29aa990a6
commit 63c97ad439

View file

@ -38,7 +38,7 @@ class RegexStringValidator(object):
except Exception as e:
raise ValidationError('Please enter a valid regular expression. '
'Got an error when trying to compile this: "%s" : "%s"'
% (self.message, value, e))
% (value, e))
if '-*' in value:
raise ValidationError('Did you really mean that? The regular expression '
'contains "-*" which will match zero or more dashes. '