title: Django - ValidationError does not display
body: <p>I recently tried the forms validations and faced an issue with ValidationError().</p>
  
  <p>The form error does not appear in my website when I submit the form.</p>
  
  <p>Here is the code: </p>
  
  <p><strong>forms.py</strong></p>
  
  <pre><code>class ArticleForm(forms.ModelForm):
  
      def clean_titre(self):
          titre = self.cleaned_data['titre']
          if len(titre) &lt; 5:
              raise ValidationError('myError')
          return titre
  
  form = ArticleForm()
  </code></pre>
  
  <p><strong>template.html</strong></p>
  
  <pre><code>&lt;div class="form-group"&gt;TITRE
    {{ form.titre.errors }}
    {{ form.titre }}
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>def AddArticle(request):
      form = ArticleForm(request.POST, request.FILES)
  
      if form.is_valid():
          save_it = form.save(commit=False)
          save_it.user = request.user
          save_it.save()
          form.save_m2m()
          return HttpResponseRedirect('/')
  </code></pre>
  
  <p>What did I do wrong?</p>
  
  <p>--- EDIT ---</p>
  
  <p>Full <strong>template.html</strong></p>
  
  <pre><code>&lt;form class="form" action="{% url "article.views.AddArticle" %}" method="post" enctype='multipart/form-data'&gt;
      {% csrf_token %}
  
      &lt;div class="form-group"&gt;TITRE
        {{ form.titre.errors }}
        {{ form.titre }}
      &lt;/div&gt;
      &lt;div class="form-group"&gt;SUMMARY
        {{ form.media }}
        {{ form.summary.errors }}
        {{ form.summary }}
      &lt;/div&gt;
      &lt;div class="form-group"&gt;CONTENU
        {{ form.media }}
        {{ form.contenu.errors }}
        {{ form.contenu }}
      &lt;/div&gt;
      &lt;div class="form-group"&gt;
        {{ form.image.errors }}
        {{ form.image }}
     &lt;/div&gt;
     &lt;div class="form-group"&gt;TAGS
        {{ form.tags.errors }}
        {{ form.tags }}
     &lt;/div&gt;
     &lt;input type="submit" class="btn btn-default" value="Submit" autocomplete="off" autocorrect="off" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I'll post the full forms.py too, it may help.</p>
  
  <p><strong>forms.py</strong></p>
  
  <pre><code>class ArticleForm(forms.ModelForm):
  
      def clean_titre(self):
          titre = self.cleaned_data['titre']
          if len(titre) &lt; 5:
              raise ValidationError('myError')
          return titre
  
      class Meta:
          model = Article
          exclude = ['date', 'rating', 'user']
  
          widgets={
              "titre":forms.TextInput(attrs={'placeholder':'Le titre', 'class':'form-control'}),
              "contenu":forms.Textarea(attrs={'placeholder':'Le Contenu de votre message', 'class':'form-control'}),
              "image":forms.FileInput(attrs={'placeholder':'Votre Image', 'id':'uploadBtn'}),
              "tags":TagWidget(attrs={'placeholder':'Vos Tags', 'class':'form-control'}),
          }
  
  form = ArticleForm()
  </code></pre>