Contao\Message::hasError PHP Method

hasError() public static method

Check if there are error messages
public static hasError ( string $strScope = TL_MODE ) : boolean
$strScope string An optional message scope
return boolean True if there are error messages
    public static function hasError($strScope = TL_MODE)
    {
        return \System::getContainer()->get('session')->getFlashBag()->has(static::getFlashBagKey('error', $strScope));
    }