title: Assigning a custom form error to a field in a modelform in django
body: <p>I am trying to assign a custom form error to a field in a modelform in django so that it appears where a 'standard' error such as the field being left blank, with the same formatting (which is handled by crispy forms).</p>
  
  <p>My model form clean method looks like this:</p>
  
  <pre><code>def clean(self):
      cleaned_data = super(CreatorForm, self).clean()
      try:
          if cleaned_data['email'] != cleaned_data['re_email']:
              raise forms.ValidationError({'email': "Your emails don't match!"})
      except KeyError:
          pass
      return cleaned_data
  </code></pre>
  
  <p>And in my template I display the form/re-submitted form like this:</p>
  
  <pre><code>{{creator_form|crispy}}
  </code></pre>
  
  <p>I would like the error to appear below the re_email field if possible (though currently I thought I'd have better luck getting it below the email field. At the moment it appears at the top of the form, unformatted.</p>
  
  <p>For the re_email field, despite not being part of the model, the error displayed for leaving it blank appears below the re_email field. How do I 'attach' errors to fields so they are displayed beneath/near them?</p>
  
  <p>All help appreciated thanks</p>