Gitlab-ci.yaml validation error

I am trying to implement includes directive in my gitlab-ci.yaml file with project, file and rules:if properties. According to the documentation this should be possible but when I try to run it in our self hosted gitlab server, the gitlab ci validator reports it as

Unable to create pipeline

* jobs config should contain at least one visible job

The gitlab ci schema validator seems to not list rules:if in context of project and file properties of include directive

Here is my gitlab ci file:

---
variables:
  TENANT:
    value: "internal"

include:
  - project: cloud-apps/pipelines
    ref: v2
    file: /v2/helmfile_vc.gitlab-ci.yml
    rules:
    - if: '$TENANT == "moc"'
  - project: cloud-apps/pipelines
    ref: v2
    file: /v2/helmfile_vc-ox.gitlab-ci.yml
    rules:
    - if: '$TENANT == "ox"'
  - project: cloud-apps/pipelines
    ref: v2
    file: /v2/helmfile_vc-internal.gitlab-ci.yml
    rules:
    - if: '$TENANT == "internal"'

Any help would be appreciated.

Our gitlab server version is 15.10.1-ee