[Fixed]-Validate form with raise errors with django

1👍

Well put this validation in clean_proposal method, for example:

def clean_proposal(self):
        data = self.cleaned_data['proposal']
        if "311" in data:
            raise forms.ValidationError("You cant send phone numbers through the form")
        return data
👤ruddra

Leave a comment