---
title: IS_YAML
url: https://www.tines.com/docs/formulas/functions/is-yaml/
kind: formula-function
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/llms.txt) › [Formulas](https://www.tines.com/llm/docs/formulas.md) › [Functions](https://www.tines.com/llm/docs/formulas/functions.md)*

# IS_YAML

*[View on tines.com](https://www.tines.com/docs/formulas/functions/is-yaml/)*

Checks if a text value is valid YAML. When `strict` is `TRUE`, the function will only return true if the input is a valid YAML document that contains key-value pairs.

**Categories:** Text

## Syntax

```
IS_YAML(text, [parse_date_or_time: FALSE], [strict: FALSE])
```

## Examples

### Example 1

Input:

```json
{
  "my_action": {
    "message": "foo: bar"
  }
}
```

Formula:

```
IS_YAML(my_action.message)
```

Output:

```json
true
```

### Example 2

Input:

```json
{
  "my_action": {
    "message": "foo: bar- foo:"
  }
}
```

Formula:

```
IS_YAML(my_action.message)
```

Output:

```json
false
```

### Example 3

Input:

```json
{
  "my_action": "\nLinkedDate: 2007-04-01 12:00:00\n"
}
```

Formula:

```
IS_YAML(my_action, parse_date_or_time: TRUE)
```

Output:

```json
true
```

### Example 4

Input:

```json
{
  "my_action": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<note>\n    <body>foo bar</body>\n</note>"
}
```

Formula:

```
IS_YAML(my_action, strict: TRUE)
```

Output:

```json
false
```

## Sample actions

```json
{
  "standardLibVersion": "45",
  "actionRuntimeVersion": "6",
  "agents": [
    {
      "disabled": false,
      "name": "IS_YAML",
      "description": null,
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "IS_YAML": "=IS_YAML(\"foo: bar\")"
        }
      },
      "position": {
        "x": 0,
        "y": 390
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "recordType": null,
      "recordWriters": [],
      "form": null,
      "createdFromTemplateGuid": null,
      "createdFromTemplateVersion": null,
      "originStoryIdentifier": "self-hosted:12c8bb2053e50b3ca4b4f45d1a3b7563:826eff0aed4e378159e8ef888a863060"
    }
  ],
  "links": [],
  "diagramNotes": []
}
```
