---
title: ValidBlockContentSettingType
description: >-
  Identifies theme block settings named content whose type doesn't return a
  string.
source_url:
  html: >-
    https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-block-content-setting-type
  md: >-
    https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-block-content-setting-type.md
api_name: liquid
---

# ValidBlockContentSettingType

Identifies a setting with the ID `content` in a theme block's `{% schema %}` tag when the setting's type doesn't return a string. A theme block receives the body content of a [`{% block %}`](https://shopify.dev/docs/api/liquid/tags/block) tag as the built-in `content` parameter, which has the type `string`. A schema setting named `content` shares that name, so it needs to return a string too.

The following [input setting](https://shopify.dev/docs/storefronts/themes/architecture/settings/input-settings) types return a string and pass this check:

* `color_background`
* `color_palette`
* `html`
* `inline_richtext`
* `liquid`
* `radio`
* `richtext`
* `select`
* `text`
* `text_alignment`
* `textarea`
* `url`
* `video_url`

Theme Check reports every other setting type that it maps to a Liquid type, such as `number`, `checkbox`, `product`, and `product_list`. It doesn't report setting types that it doesn't map, such as `metaobject`.

This check applies only to files in the `blocks` directory.

***

## Examples

The following examples contain code snippets that either fail or pass this check.

### ✗ Fail

In the following example, the `content` setting is a `number` setting, so Theme Check reports `Schema setting 'content' has Liquid type 'number', but the built-in 'content' parameter has type 'string'.`:

## blocks/card.liquid

```liquid
<div class="card">{{ content }}</div>


{% schema %}
{
  "name": "Card",
  "settings": [
    {
      "type": "number",
      "id": "content",
      "label": "Content"
    }
  ]
}
{% endschema %}
```

### ✓ Pass

In the following example, the `content` setting is a `richtext` setting, which returns a string:

## blocks/card.liquid

```liquid
<div class="card">{{ content }}</div>


{% schema %}
{
  "name": "Card",
  "settings": [
    {
      "type": "richtext",
      "id": "content",
      "label": "Content"
    }
  ]
}
{% endschema %}
```

***

## Options

The following example contains the default configuration for this check:

```yaml
ValidBlockContentSettingType:
  enabled: true
  severity: error
```

| Parameter | Description |
| - | - |
| `enabled` | Whether this check is enabled. |
| `severity` | The [severity](https://shopify.dev/docs/storefronts/themes/tools/theme-check/configuration#check-severity) of the check. |

***

## Disabling this check

Disabling this check isn't recommended.

***
