---
title: "How to Validate and Auto-Correct Cart Quantities"
description: "Decide what happens when a WooCommerce customer adds a quantity that breaks your rules: validate or auto-correct."
url: "https://wpfactory.com/docs/woocommerce-validate-auto-correct-quantities/"
updated: "2026-09-27"
category: How to
---

# How to Validate and Auto-Correct Cart Quantities

The "Add to cart" validation controls in the [Min Max Step Quantity Limits Manager for WooCommerce](https://wpfactory.com/item/product-quantity-for-woocommerce/) decide what happens when a customer tries to add a quantity that breaks your rules: allow it, block it with a notice, or silently correct it. This is a free feature.

![Add to cart validation options in the General section](https://wpfactory.com/wp-content/uploads/woocommerce-validate-auto-correct-quantities-1.png)

### Steps

1. Go to **WPFactory > Quantity Manager > General** (also reachable at **WooCommerce > Settings > Product Quantity**).
2. Set **"Add to cart" validation** (`wpfmmsq_add_to_cart_validation`) to one of:
   - **Do not validate**: no check on add to cart.
   - **Validate and add notices**: block the invalid quantity and show a notice (recommended for most stores).
   - **Validate and auto-correct quantities**: adjust the quantity to the nearest valid value automatically.
3. If you chose auto-correct, set **Step auto-correct** (`wpfmmsq_add_to_cart_validation_step_auto_correct`) to Round, Round up or Round down.
4. Click **Save changes**.

### Options reference

| Label | Option ID | Default | Free/Pro |
| --- | --- | --- | --- |
| "Add to cart" validation | `wpfmmsq_add_to_cart_validation` | Do not validate | Free |
| Step auto-correct | `wpfmmsq_add_to_cart_validation_step_auto_correct` | Round | Free |
| Validate on checkout | `wpfmmsq_validate_on_checkout` | Yes | Free |

**Tip:** pair validation with **Cart notices** and **Block checkout page** (General section) so wrong quantities are caught on the cart too, not only at add to cart.

### Get more control

These controls are free. [Min Max Step Quantity Limits Manager for WooCommerce](https://wpfactory.com/item/product-quantity-for-woocommerce/) Pro adds per-category and per-attribute rules to validate against. Per-product minimum, maximum and step are free. [See what Pro unlocks](https://wpfactory.com/item/product-quantity-for-woocommerce/).

Related articles

- [How to Block Checkout When Cart Quantities Are Wrong](https://wpfactory.com/docs/block-checkout-pages/)
- [Decimal Quantities Causing Errors in Cart or Checkout](https://wpfactory.com/docs/decimal-quantity-errors/)
- [Customers Can Still Add Multiple Quantities to the Cart](https://wpfactory.com/docs/multiple-quantity-allowed/)
- [How to Set Per Product and Per Category Default Quantities](https://wpfactory.com/docs/item-quantity-defaults/)
- [How to Enable Decimal Quantities in WooCommerce](https://wpfactory.com/docs/decimal-quantity-utilization/)
