'Check all root level keywords are valid. Config may be modified by before_config_validate hooks. Modified
config will be returned.
:param config: Config to check. If not provided, current manager config will be checked.
:raises: `ValueError` when config fails validation. There will be an `errors` attribute with the schema errors.
:returns: Final validated config.'

def validate_config(self, config=None):

    if (not config):
        config = self.config
    config = fire_event(u'manager.before_config_validate', config, self)
    errors = config_schema.process_config(config)
    if errors:
        err = ValueError(u'Did    not    pass    schema    validation.')
        err.errors = errors
        raise err
    else:
        return config
