From cc8e8ba6c68cc04d3f2ed288b8598bf5120ecad8 Mon Sep 17 00:00:00 2001 From: Brian Wilson Date: Wed, 9 Jan 2013 13:31:04 -0500 Subject: [PATCH] Pearson reg: relax validation of phone country codes. --- common/djangoapps/student/models.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/common/djangoapps/student/models.py b/common/djangoapps/student/models.py index f85ebd0625..95ceb34528 100644 --- a/common/djangoapps/student/models.py +++ b/common/djangoapps/student/models.py @@ -287,13 +287,7 @@ class TestCenterUserForm(ModelForm): def clean_country(self): return self.check_country_code('country') - - def clean_phone_country_code(self): - return self.check_country_code('phone_country_code') - - def clean_fax_country_code(self): - return self.check_country_code('fax_country_code') - + def clean(self): cleaned_data = super(TestCenterUserForm, self).clean() @@ -317,7 +311,7 @@ class TestCenterUserForm(ModelForm): cleaned_data_fields = [fieldname for fieldname in cleaned_data] for fieldname in cleaned_data_fields: if not TestCenterUserForm.can_encode_as_latin(cleaned_data[fieldname]): - self._errors[fieldname] = self.error_class([u'Must only use characters in Latin-1 encoding']) + self._errors[fieldname] = self.error_class([u'Must only use characters in Latin-1 (iso-8859-1) encoding']) del cleaned_data[fieldname] # Always return the full collection of cleaned data.