If you use Magento 2.2.x or greater and receive the error message:
1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'block', attribute 'class': [facet 'pattern'] The value '\Magento\Framework\View\Element\Text\ListText' is not accepted by the pattern '[A-Z][_a-zA-Z\d]*(\\[A-Z][_a-zA-Z\d]*)*'. Line: 982 Element 'block', attribute 'class': '\Magento\Framework\View\Element\Text\ListText' is not a valid value of the atomic type 'blockClassType'. Line: 982 Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'block', attribute 'class': [facet 'pattern'] The value '\Magento\Framework\View\Element\Text\ListText' is not accepted by the pattern '[A-Z][_a-zA-Z\d]*(\\[A-Z][_a-zA-Z\d]*)*'. Line: 982 Element 'block', attribute 'class': '\Magento\Framework\View\Element\Text\ListText' is not a valid value of the atomic type 'blockClassType'. Line: 982
You need to check all layout files in your theme and custom extensions, they may have a code e.g.:
class="\Magento
you need to change it to
class="Magento
and then flush the Magento cache.
In order to find all bad layout files you can run the CLI command in Magento 2 root directory:
grep -r app -e 'class="\\'
Note that most likely you get this error because of using outdated versions of Magento 2 extensions or themes.