diff --git a/AUTHORS b/AUTHORS index 52c710e1c3..af26d71d28 100644 --- a/AUTHORS +++ b/AUTHORS @@ -48,6 +48,7 @@ answer newbie questions, and generally made Django that much better: Clint Ecker Baishampayan Ghose Espen Grindhaug + Gustavo Picon Brant Harris Ian Holsman Kieran Holland diff --git a/django/core/formfields.py b/django/core/formfields.py index 1ae4873fa2..c1084fad95 100644 --- a/django/core/formfields.py +++ b/django/core/formfields.py @@ -325,11 +325,13 @@ class FormField: class TextField(FormField): input_type = "text" - def __init__(self, field_name, length=30, maxlength=None, is_required=False, validator_list=[]): + def __init__(self, field_name, length=30, maxlength=None, is_required=False, validator_list=[], member_name=None): self.field_name = field_name self.length, self.maxlength = length, maxlength self.is_required = is_required self.validator_list = [self.isValidLength, self.hasNoNewlines] + validator_list + if member_name != None: + self.member_name = member_name def isValidLength(self, data, form): if data and self.maxlength and len(data.decode(DEFAULT_CHARSET)) > self.maxlength: