def get_shortname(self):
        """Validate and returns disqus_shortname config value.

        :returns: disqus_shortname config value.
        :rtype: str
        """
        disqus_shortname = self.state.document.settings.env.config.disqus_shortname
        if not disqus_shortname:
            raise ExtensionError('disqus_shortname config value must be set for the disqus extension to work.')
        if not RE_SHORTNAME.match(disqus_shortname):
            raise ExtensionError('disqus_shortname config value must be 3-50 letters, numbers, and hyphens only.')
        return disqus_shortname
Validate and returns disqus_shortname config value.

        :returns: disqus_shortname config value.
        :rtype: str