protected function validateInput($input)
    {
        // check
        $keys = [
            'form',
            'elements',
        ];

        switch (gettype($input)) {
            case 'array':
                foreach ($keys as $key) {
                    if (array_key_exists($key, $input) === false) {
                        throw new \Exception(
                            'Input invalid! Please make sure that input array contains keys (form, elements).'
                        );
                    }
                }
                break;
        }

        return true;
    }