예제 #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']