function getValidationConfiguration() {
  return global.kuzzle.internalIndex
    .search("validations", {}, { from: 0, size: 1000 })
    .then((result) => {
      let validation = {};

      if (result && Array.isArray(result.hits) && result.hits.length > 0) {
        for (const { _source, _id } of result.hits) {
          const collectionName = `${_id.split("#")[0]}/${_id.split("#")[1]}`;

          if (!get(_source, "index")) {
            throw assertionError.get(
              "incorrect_validation_format",
              collectionName,
              "index",
            );
          }

          if (!get(_source, "collection")) {
            throw assertionError.get(
              "incorrect_validation_format",
              collectionName,
              "collection",
            );
          }

          if (!get(_source, "validation")) {
            throw assertionError.get(
              "incorrect_validation_format",
              collectionName,
              "validation",
            );
          }

          if (!has(validation, _source.index)) {
            validation[_source.index] = {};
          }

          validation[_source.index][_source.collection] = _source.validation;
        }
      } else if (global.kuzzle.config.validation) {
        // We can't wait prepareDb as it runs outside of the rest of the start
        validation = global.kuzzle.config.validation;
      }

      return validation;
    });
}
Retrieve the plugins list from the database and returns it,
along with their configuration

@returns {Promise}