def get_form_invalid_message(self):
        if self.form_invalid_message is None:
            raise ImproperlyConfigured(
                '{0}.form_invalid_message is not set. Define '
                '{0}.form_invalid_message, or override '
                '{0}.get_form_invalid_message().'.format(
                    self.__class__.__name__))

        if not isinstance(self.form_invalid_message,
                          (six.string_types, six.text_type, Promise)):
            raise ImproperlyConfigured(
                '{0}.form_invalid_message must be a str or unicode '
                'object.'.format(self.__class__.__name__))

        return force_text(self.form_invalid_message)
Validate that form_invalid_message is set and is either a
dataset/ETHPy150Open brack3t/django-braces/braces/views/_forms.py/FormInvalidMessageMixin.get_form_invalid_message