---
title: ValidRangeStepCount
description: Identifies range settings with more than 101 steps.
source_url:
  html: >-
    https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-range-step-count
  md: >-
    https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-range-step-count.md
api_name: liquid
---

# ValidRangeStepCount

Identifies [`range`](https://shopify.dev/docs/storefronts/themes/architecture/settings/input-settings#range) settings with more than 101 steps. Shopify allows at most 101 steps in a `range` setting.

A setting's step count is `(max - min) / step + 1`. If a setting doesn't have a `step`, then Theme Check uses a step of `1`. For example, a setting with a `min` of `0`, a `max` of `100`, and a `step` of `1` has 101 steps. To reduce the step count, increase the `step` or narrow the range between `min` and `max`.

This check covers the `range` settings in the `{% schema %}` tag of a section or theme block, including the settings of blocks that the schema defines, and the `range` settings in `config/settings_schema.json`. It skips a `range` setting if its `min`, `max`, or `step` isn't a number, if its `step` isn't greater than `0`, or if its `max` isn't greater than its `min`.

***

## Examples

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

### ✗ Fail

In the following example, the setting has 201 steps, so Theme Check reports `Range setting "width" has 201 steps (min 0, max 200, step 1). Shopify allows at most 101 steps.`:

## sections/example.liquid

```liquid
{% schema %}
{
  "name": "Example",
  "settings": [
    {
      "type": "range",
      "id": "width",
      "label": "Width",
      "min": 0,
      "max": 200,
      "step": 1,
      "default": 100
    }
  ]
}
{% endschema %}
```

In the following example, the setting doesn't have a `step`, so Theme Check uses a step of `1` and reports `Range setting "logo_width" has 201 steps (min 0, max 200, step 1). Shopify allows at most 101 steps.`:

## config/settings\_schema.json

```json
[
  {
    "name": "Layout",
    "settings": [
      {
        "type": "range",
        "id": "logo_width",
        "label": "Logo width",
        "min": 0,
        "max": 200,
        "default": 100
      }
    ]
  }
]
```

### ✓ Pass

In the following example, a step of `2` gives the setting 101 steps:

## sections/example.liquid

```liquid
{% schema %}
{
  "name": "Example",
  "settings": [
    {
      "type": "range",
      "id": "width",
      "label": "Width",
      "min": 0,
      "max": 200,
      "step": 2,
      "default": 100
    }
  ]
}
{% endschema %}
```

In the following example, a step of `0.1` between `1` and `5` gives the setting 41 steps:

## sections/example.liquid

```liquid
{% schema %}
{
  "name": "Example",
  "settings": [
    {
      "type": "range",
      "id": "rating",
      "label": "Rating",
      "min": 1,
      "max": 5,
      "step": 0.1,
      "default": 4.7
    }
  ]
}
{% endschema %}
```

***

## Options

The following example contains the default configuration for this check:

```yaml
ValidRangeStepCount:
  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.

***
