title: django 1.11 raise forms.validationError not showing the error in html
body: <p>I've tried looking around for solutions on how to check if a form's name is already existing in the database. I used <a href="https://stackoverflow.com/questions/39600784/django-1-9-check-if-email-already-exists?answertab=votes#tab-top">this link</a> to figure out how, and it is indeed not allowing duplicate names to be entered. But where I expected one, I did not get an error message. I'm not sure what I'm doing wrong here, so if anyone can tell me what I should do, that would be really useful!</p>
  
  <p>addgame.html:</p>
  
  <pre><code>&lt;form method="POST" class="post-form" enctype="multipart/form-data"&gt;
            {% csrf_token %}
            {% if form.non_field_errors %}
                {% for error in form.non_field_errors %}
                  {{ error }}
                {% endfor %}
            {% endif %}
            &lt;div class="form-group"&gt;
              {{ form.name.label_tag }}
              {% render_field form.name class="form-control" %}
              &lt;br&gt;
              {{ form.genre.label_tag }}
              {% render_field form.genre class="form-control" %}
              &lt;br&gt;
              {{ form.image.label_tag }}
              {{ form.image }}
            &lt;/div&gt;
            &lt;hr&gt;
            &lt;button type="submit" class="save btn btn-primary"&gt;Save&lt;/button&gt;
          &lt;/form&gt;
  </code></pre>
  
  <p>views.py:</p>
  
  <pre><code>def addgame(request):
  if request.method == "POST":
      form = InfoForm(request.POST, request.FILES)
      if form.is_valid():
          infolist = form.save(commit=False)
          infolist.created_date = timezone.now()
          infolist.save()
          return redirect('index')
  else:
      form = InfoForm()
  return render(request, 'ranking/addgame.html', {'form': form})
  </code></pre>
  
  <p>forms.py:</p>
  
  <pre><code>class InfoForm(forms.ModelForm):
  
  class Meta:
      model = GameInfo
      fields = ('name', 'image', 'genre')
  
  def clean_name(self):
      name = self.cleaned_data['name']
      try:
          match = GameInfo.objects.get(name=name)
      except GameInfo.DoesNotExist:
          return name
      raise forms.ValidationError('This game has already been added to the list.')
  </code></pre>
  
  <p>not sure if needed, so I'll post models.py as well:</p>
  
  <pre><code>class GameInfo(models.Model):
  GAME_CHOICE = [
      ("BMU", "Beat 'em up"),
      ("FT", "Fighting"),
      ("PF", "Platform"),
      ("FPS", "Shooter"),
      ("SV", "Survival"),
      ("ST", "Stealth"),
      ("AA", "Action Adventure"),
      ("EX", "Exploring"),
      ("SH", "Survival horror"),
      ("IF", "Interactive fiction"),
      ("IM", "Interactive movie"),
      ("VN", "Visual novel"),
      ("ARP", "Action role-playing"),
      ("JRP", "Japanese role-playing"),
      ("TRP", "Tactical role-playing"),
      ("CAM", "Construction and management"),
      ("LS", "Life simulation"),
      ("SP", "Sports"),
      ("VH", "Vehicle"),
      ("MOBA", "Multiplayer online battle arena"),
      ("RTS", "Real-time strategy"),
      ("RTT", "Real-time tactics"),
      ("TBS", "Turn-based strategy"),
      ("TBT", "Turn-based tactics"),
      ("MMORPG", "MMORPG"),
      ("MMOFPS", "MMO-FPS"),
      ("MMOR", "MMO Racing"),
      ("CG", "Cardgame"),
      ("PAC", "Point and Click"),
      ("MG", "Music Game"),
      ("VR", "Virtual Reality"),
      ("RC", "Racing"),
  ]
  name = models.CharField(max_length=100)
  created_date = models.DateTimeField(default=timezone.now)
  image = models.ImageField(upload_to='./media/images/')
  genre = models.CharField(
      max_length=6,
      choices=GAME_CHOICE,
      default="BMU",
  )
  
  def __str__(self):
      return self.name
  
  class Meta:
      ordering = ('name',)
  </code></pre>