[Fixed]-ValidationError while using ModelForm Django


Your validation method needs to be called clean_due_date. In Django < 3 it should raise forms.ValidationError, but in Django 3 it should use core.exceptions.ValidationError.

I have no idea what the get_summary and get_description methods are for, they aren’t called and don’t do anything useful.

See the Django 3 docs here and the Django 2 docs here.

Leave a comment