def clean_credit_number(self):
        data = self.cleaned_data
        credit_number = data['credit_number']
        card = CreditCard(credit_number, data['credit_type'])
        results, msg = card.verifyCardTypeandNumber()
        if not results:
            raise forms.ValidationError(msg)

        return credit_number
Check if credit card is valid.
dataset/ETHPy150Open dokterbob/satchmo/satchmo/apps/payment/forms.py/CreditPayShipForm.clean_credit_number