Esempio n. 1
0
    def clean(self):
        cleaned_data = super(BillingInfoForm, self).clean()

        try:
            cleaned_data['tax_number'] = BillingInfo.clean_tax_number(cleaned_data['tax_number'], cleaned_data.get('country', None))
        except ValidationError, e:
            self._errors['tax_number'] = e.messages
Esempio n. 2
0
    def clean(self):
        cleaned_data = super(BillingInfoForm, self).clean()

        try:
            cleaned_data['tax_number'] = BillingInfo.clean_tax_number(
                cleaned_data['tax_number'], cleaned_data.get('country', None))
        except ValidationError, e:
            self._errors['tax_number'] = e.messages
Esempio n. 3
0
 def clean_tax_number(self):
     self.cleaned_data['tax_number'] = BillingInfo.clean_tax_number(self.cleaned_data['tax_number'], self.cleaned_data['country'])
     return self.cleaned_data['tax_number']
Esempio n. 4
0
 def clean_tax_number(self):
     self.cleaned_data['tax_number'] = BillingInfo.clean_tax_number(self.cleaned_data['tax_number'], self.cleaned_data.get('country', None))
     return self.cleaned_data['tax_number']