> ## 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.

A JSON-encoded object used by Supercycle's cart validation to enforce rules at checkout. Multiple validations are merged into a single object — only the relevant keys will be present for a given line item.

```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">
  Validates that the customer has enough membership credits to complete the rental.

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

<ResponseField name="required_variant" type="object">
  Validates that a specific variant (e.g. a deposit) is present in the cart alongside this line item.

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

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

<ResponseField name="quantity" type="object">
  Validates that the quantity of this line item does not exceed 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">
  Validates that all rental line items in the cart share the same value for a given property. Used to prevent mixing incompatible options (e.g. different rental start dates).

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

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