title: Django Registration - errors messages don't appears
body: <p>I try to understand why errors don't appears on my template. <strong>I'm using classical registration with checks (email and username). If email already exists = error and the same for username</strong>. The thing is error appear if it's about password (ex. password are not the same, ...) but for email and username nothing appears.</p>
  <p>template</p>
  <pre><code>&lt;form method=&quot;post&quot; class=&quot;user-log&quot;&gt;
  {% csrf_token %}
  {% if form.errors %}
                                  
                                          &lt;div class=&quot;alert alert-warning alert-dismissible fade show&quot; role=&quot;alert&quot;&gt;
                                          Oupss &lt;a data-toggle=&quot;collapse&quot; href=&quot;#collapseExample&quot; class=&quot;alert-link&quot; style=&quot;text-decoration:none;&quot;&gt;something wrong&lt;/a&gt;!
                                          &lt;button type=&quot;button&quot; class=&quot;close&quot; data-dismiss=&quot;alert&quot; aria-label=&quot;Close&quot;&gt;
                                              &lt;span aria-hidden=&quot;true&quot; style=&quot;color: #ffd14c;&quot;&gt;&amp;times;&lt;/span&gt;
                                          &lt;/button&gt;
                                          &lt;div class=&quot;collapse&quot; id=&quot;collapseExample&quot;&gt;
                                              {% for field in form %}
                                              {% if field.errors %}
                                              &lt;strong&gt;{{ form.label }}&lt;/strong&gt; {{ field.errors|striptags }}
                                              {% endif %}
                                              {% endfor %}
                                          &lt;/div&gt;
                                          &lt;/div&gt;
  </code></pre>
  <p>views</p>
  <pre><code>def signup(request):
      if request.method == 'GET':
          return render(request, 'register.html')
      if request.method == 'POST':
          form = RegisterForm(request.POST)
          # print(form.errors.as_data())
          if form.is_valid():
              user = form.save(commit=False)
              user.is_active = False
              user.save()
              current_site = get_current_site(request)
              mail_subject = 'Activate your registration'
              message = render_to_string('user_activation_email.html', {
                  'user': user,
                  'domain': current_site.domain,
                  'uid': urlsafe_base64_encode(force_bytes(user.pk)),
                  'token': default_token_generator.make_token(user),
              })
              to_email = form.cleaned_data.get('email')
              email = EmailMessage(
                  mail_subject, message, to=[to_email]
              )
              email.send()
              return redirect ('user:user_registration_process')
      else:
          form = RegisterForm()
      return render(request, 'register.html', {'form': form})   
  </code></pre>
  <p>forms</p>
  <pre><code>class RegisterForm(UserCreationForm):
      username = forms.CharField(max_length=50)
      email = forms.EmailField(max_length=50)
      password1 = forms.CharField()
      password2 = forms.CharField()
      
      def clean(self):
         username = self.cleaned_data.get('username')
         if User.objects.filter(username=username).exists():
              raise forms.ValidationError(&quot;Ooops username already exists&quot;)
         email = self.cleaned_data.get('email')
         password1 = self.cleaned_data.get('password1')
         password1 = self.cleaned_data.get('password1')
         if User.objects.filter(email=email).exists():
              raise forms.ValidationError(&quot;Ooops email already exists&quot;)
         return self.cleaned_data
  
      class Meta(UserCreationForm):
          model = User
          fields = ('username','email','password1','password2')
  </code></pre>