EditorJS/BlockHandler.php
public function validateBlock($blockType, $blockData)
    {
        /**
         * Default action for blocks that are not mentioned in a configuration
         */
        if (!array_key_exists($blockType, $this->rules->tools)) {
            throw new EditorJSException("Tool `$blockType` not found in the configuration");
        }

        $rule = $this->rules->tools[$blockType];

        return $this->validate($rule, $blockData);
    }
public function validateBlock($blockType, $blockData)
    {
        /**
         * Default action for blocks that are not mentioned in a configuration
         */
        if (!array_key_exists($blockType, $this->rules->tools)) {
            throw new EditorJSException("Tool `$blockType` not found in the configuration");
        }

        $rule = $this->rules->tools[$blockType];

        return $this->validate($rule, $blockData);
    }
public function validateBlock ( $ blockType , $ blockData ) { /**
         * Default action for blocks that are not mentioned in a configuration
         */ if ( ! array_key_exists ( $ blockType , $ this -> rules -> tools ) ) { throw new EditorJSException ( "Tool `$blockType` not found in the configuration" ) ; } $ rule = $ this -> rules -> tools [ $ blockType ] ; return $ this -> validate ( $ rule , $ blockData ) ; }
Validate block for correctness

@param string $blockType
@param array  $blockData

@throws EditorJSException

@return bool
Validate block for correctness