# Tag Validation Mode

1. Can be applied at the presentation level or slide level (the lowest level takes precedence).
2. Select between the two modes: [#strict](#strict "mention") or [#lenient](#lenient "mention")

### Strict

1. The system validates all tags defined in the payload.
2. If any tag is missing from the template.pptx, a `VALIDATION_ERROR` (400) is returned.

Reference: [tags](https://docs.powerpointgeneratorapi.com/json-template-syntax/tags "mention")

Download: [input.zip](https://drive.google.com/uc?export=download\&id=1-ou1x1WjiEOmhxMj7jUss85hS85CkESc)

{% columns %}
{% column width="41.66666666666667%" %}

<figure><img src="https://1155212587-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgoqdluo05I2RXHZpTr-887967055%2Fuploads%2FjluG40czoeDRsl6yyUPf%2Ftemplate.png?alt=media&#x26;token=69bccf5a-91b6-4d74-bb21-876331edd80b" alt=""><figcaption></figcaption></figure>
{% endcolumn %}

{% column width="58.33333333333333%" %}
{% code lineNumbers="true" %}

```json
{
  "presentation": {
    "template": "template.pptx",
    "tag_validation_mode": "strict",
    "slides": [
      {
        "slide_index": 0,
        "tags": [
          {
            "key": "non-existent-tag",
            "value": "ONE"
          },
          {
            "key": "date",
            "value": "TWO"
          },
          {
            "key": "client",
            "value": "THREE"
          },
          {
            "key": "type",
            "value": "FOUR"
          },
          {
            "key": "month",
            "value": "FIVE"
          }
        ]
      }
    ]
  }
}

```

{% endcode %}
{% endcolumn %}
{% endcolumns %}

### Lenient

1. Missing tags are skipped without interrupting execution.
2. This mode is useful when working with templates that have optional placeholders or evolving structures.

Reference: [tags](https://docs.powerpointgeneratorapi.com/json-template-syntax/tags "mention")

Download: [input.zip](https://drive.google.com/uc?export=download\&id=1VwMvF4DU16NoW37-n4MEQl7pFpeD0W6w) | [output.pptx](https://drive.google.com/uc?export=download\&id=1-thmVhz_GgRuLGKvAUM0_ZEMW-IpetxD)

{% columns %}
{% column width="41.66666666666667%" %}

<figure><img src="https://1155212587-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgoqdluo05I2RXHZpTr-887967055%2Fuploads%2FjluG40czoeDRsl6yyUPf%2Ftemplate.png?alt=media&#x26;token=69bccf5a-91b6-4d74-bb21-876331edd80b" alt=""><figcaption></figcaption></figure>

***

<figure><img src="https://1155212587-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgoqdluo05I2RXHZpTr-887967055%2Fuploads%2Fo0YAlCNZXNyqHn8fge4m%2Foutput.png?alt=media&#x26;token=8788fde3-e8f3-4436-b929-c8413505ce5a" alt=""><figcaption></figcaption></figure>
{% endcolumn %}

{% column width="58.33333333333333%" %}
{% code lineNumbers="true" %}

```json
{
  "presentation": {
    "template": "template.pptx",
    "tag_validation_mode": "lenient",
    "slides": [
      {
        "type": "slide",
        "slide_index": 0,
        "tags": [
          {
            "key": "non-existent-tag",
            "value": "ONE"
          },
          {
            "key": "date",
            "value": "TWO"
          },
          {
            "key": "client",
            "value": "THREE"
          },
          {
            "key": "type",
            "value": "FOUR"
          },
          {
            "key": "month",
            "value": "FIVE"
          }
        ]
      }
    ]
  }
}

```

{% endcode %}
{% endcolumn %}
{% endcolumns %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.powerpointgeneratorapi.com/examples/tagging/tag-validation-mode.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
