> ## Documentation Index
> Fetch the complete documentation index at: https://docs.supercycle.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Validations line item property

> Schema for the _validations line item property that Supercycle enforces in the cart and at checkout

The `_validations` line item property is a JSON-encoded object that Supercycle's cart validation reads to enforce rules at checkout. Several validations merge into one object, and only the keys relevant to that line item are present.

```json Example theme={null}
{
  "membership": { "credits": 5 },
  "required_variant": { "id": 987654, "per_line": 1 },
  "quantity": { "max": 3 },
  "uniformity": { "key": "rental_start", "value": "2025-01-01" }
}
```

***

## Validations

<ResponseField name="membership" type="object">
  Checks that the customer has enough membership credits to complete the rental.

  <Expandable title="properties">
    <ResponseField name="credits" type="integer" required>
      Number of credits the line item needs.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="required_variant" type="object">
  Checks that a specific variant, such as a deposit, is in the cart alongside this line item.

  <Expandable title="properties">
    <ResponseField name="id" type="integer" required>
      Shopify variant ID that must be in the cart.
    </ResponseField>

    <ResponseField name="per_line" type="integer">
      Quantity required per unit of the rental line item. Defaults to `1`.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="quantity" type="object">
  Checks that the line item's quantity doesn't exceed the available inventory.

  <Expandable title="properties">
    <ResponseField name="max" type="integer" required>
      Maximum quantity allowed in the cart for this line item.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="uniformity" type="object">
  Checks that every rental line item in the cart shares the same value for a property, to stop incompatible options mixing, such as different rental start dates.

  <Expandable title="properties">
    <ResponseField name="key" type="string" required>
      The property key that must match across all rental line items.
    </ResponseField>

    <ResponseField name="value" type="string" required>
      The expected value for that key.
    </ResponseField>
  </Expandable>
</ResponseField>
