function buildValidatorObject(draftToUse) {
  if (drafts2019.includes(draftToUse)) {
    return new Ajv2019({
      // check all rules collecting all errors. instead returning after the first error.
      allErrors: true,
      strict: false
    });
  }
  let ajv = new Ajv({
    // check all rules collecting all errors. instead returning after the first error.
    allErrors: true,
    strict: false
  });

  if (draftToUse === draft06) {
    ajv.addMetaSchema(draft6MetaSchema);
  }

  if (draftToUse === draft07) {
    ajv.addMetaSchema(draft7MetaSchema);
  }
  return ajv;
}
Used to validate schema against a value.
NOTE: Used in assets/json-schema-faker.js to validate schema example
@param {*} draftToUse - draft to use in this validation
@returns {*} - Found Validation Errors