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
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
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']
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']