[Answer]-Form error doesnt display on template?

1👍

karthikr is trying to tell you what is wrong in the comments. You are not using the form to validate, so it won’t show any errors. Instead of doing if validateEmail(email) you should have the email validation code inside the form class, and in the view you call if form.is_valid().

Plus, when you do write the form’s clean_email method, you should not be catching ValidationError: that’s the way that errors are passed on to the form’s errors list.

Leave a comment