validateParentTag = (element, model) => {
  const parentTypes = model.properties.parentTypes?.value;

  if (
    !parentTypes ||
    element.parentTypes.find((elementParentType) =>
      parentTypes.find((type) => elementParentType === type.toLowerCase()),
    )
  ) {
    return null;
  }
  return errorBuilder.parentTagUnexpected(model.name, "parent", element.tagName, model.properties.parentTypes);
}
Validates parent of tag
Checks that parent tag has the right type
@param {Object} element
@param {Object} model
@param {Object[]} flatTree