Skip to content

Commit

Permalink
Refs #23151 -- Removed RegexField's unused error_message parameter.
Browse files Browse the repository at this point in the history
Should have been removed in b6ea196.
  • Loading branch information
timgraham committed Feb 21, 2017
1 parent fb7e0e0 commit afcf44c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions django/forms/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,11 +495,9 @@ def to_python(self, value):


class RegexField(CharField):
def __init__(self, regex, max_length=None, min_length=None, error_message=None, *args, **kwargs):
def __init__(self, regex, max_length=None, min_length=None, *args, **kwargs):
"""
regex can be either a string or a compiled regular expression object.
error_message is an optional error message to use, if
'Enter a valid value' is too generic for you.
"""
kwargs.setdefault('strip', False)
super().__init__(max_length, min_length, *args, **kwargs)
Expand Down

0 comments on commit afcf44c

Please sign in to comment.