def clean(self):
        super(CreditCardForm, self).clean()

        cleaned_data = self.cleaned_data

        number = cleaned_data.get('number')
        security_code = cleaned_data.get('security_code')
        exp_month = cleaned_data.get('exp_month')
        exp_year = cleaned_data.get('exp_year')

        if not self.is_valid():
            raise forms.ValidationError("There was a problem processing your payment")

        if not is_valid_cc(number):
            raise forms.ValidationError("Invalid credit card number")

        if not is_valid_cvv(security_code):
            raise forms.ValidationError("Invalid security code")

        if not is_valid_exp(exp_month, exp_year):
            raise forms.ValidationError("Invalid expiracy date")

        return cleaned_data
Validates the form
dataset/ETHPy150Open abunsen/Paython/paython/django/forms.py/CreditCardForm.clean