Пример #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
Пример #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
Пример #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']
Пример #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']