summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/contrib/localflavor/za/forms.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/django/contrib/localflavor/za/forms.py b/django/contrib/localflavor/za/forms.py
index 9a54f1ecb2..4fb4203e45 100644
--- a/django/contrib/localflavor/za/forms.py
+++ b/django/contrib/localflavor/za/forms.py
@@ -22,14 +22,14 @@ class ZAIDField(Field):
}
def clean(self, value):
- # strip spaces and dashes
- value = value.strip().replace(' ', '').replace('-', '')
-
super(ZAIDField, self).clean(value)
if value in EMPTY_VALUES:
return u''
+ # strip spaces and dashes
+ value = value.strip().replace(' ', '').replace('-', '')
+
match = re.match(id_re, value)
if not match:
@@ -57,4 +57,4 @@ class ZAPostCodeField(RegexField):
def __init__(self, *args, **kwargs):
super(ZAPostCodeField, self).__init__(r'^\d{4}$',
- max_length=None, min_length=None)
+ max_length=None, min_length=None, *args, **kwargs)