def form_invalid(self, post_form, attachment_formset, poll_option_formset, **kwargs):
        """ Processes invalid forms. """
        poll_errors = [k for k in post_form.errors.keys() if k.startswith('poll_')]
        if (
            poll_errors or
            (
                poll_option_formset and
                not poll_option_formset.is_valid() and
                len(post_form.cleaned_data['poll_question'])
            )
        ):
            messages.error(self.request, self.poll_option_formset_general_error_message)

        return super().form_invalid(
            post_form, attachment_formset, poll_option_formset=poll_option_formset, **kwargs)
Processes invalid forms.