code: def form_invalid(self, form):
          
          ip = get_user_ip(self.request)
          if settings.CONTACT_FORM_USE_SIGNALS:
              contact_form_invalid.send(
                  sender=self,
                  event=self.invalid_event,
                  ip=ip,
                  site=self.site,
                  sender_name=form['sender_name'],
                  sender_email=form['sender_email']
              )
  
          return super(ContactFormView, self).form_invalid(form)
docs: This is what's called when the form is invalid.