curateFieldSpecification(
    fieldSpec,
    indexName,
    collectionName,
    fieldName,
    verboseErrors = false,
  ) {
    const errors = [];

    const result = this.curateFieldSpecificationFormat(
      fieldSpec,
      indexName,
      collectionName,
      fieldName,
      verboseErrors,
    );

    if (result.isValid === false) {
      return result;
    }

    _.defaultsDeep(fieldSpec, {
      mandatory: false,
      multivalued: {
        value: false,
      },
    });

    if (!has(fieldSpec, "typeOptions")) {
      fieldSpec.typeOptions = {};
    }

    const allowed = this.types[fieldSpec.type].allowedTypeOptions || [];

    if (!checkAllowedProperties(fieldSpec.typeOptions, allowed)) {
      throwOrStoreError(
        assertionError.get(
          "unexpected_properties",
          `${indexName}.${collectionName}.${fieldName}`,
          allowed.join(", "),
        ),
        verboseErrors,
        errors,
      );
    }

    try {
      fieldSpec.typeOptions = this.types[
        fieldSpec.type
      ].validateFieldSpecification(fieldSpec.typeOptions);
    } catch (e) {
      if (!verboseErrors) {
        if (e instanceof KuzzleError) {
          throw e;
        }
        throw kerror.getFrom(
          e,
          "plugin",
          "runtime",
          "unexpected_error",
          e.message,
        );
      }

      errors.push(e.message);
    }

    if (errors.length > 0) {
      return { errors, isValid: false };
    }

    debug(
      "Loaded field validator: %s/%s/%s: %o",
      indexName,
      collectionName,
      fieldName,
      fieldSpec,
    );

    return { fieldSpec, isValid: true };
  }
@param {FieldSpecification} fieldSpec
@param {string} indexName
@param {string} collectionName
@param {string} fieldName
@param {boolean} [verboseErrors]
@returns {object}
@throws PreconditionError