ChaosQA · Guides

Quantity field test cases

Updated November 3, 2026

A quantity field has two numbers in its rules, a minimum and a maximum. The values around them are the first test. The sections after the first follow a value past the field, into the total and into the request the server receives, which is where the limit is often missing.

Values around the edges

For a field that allows 1 to 10:

ValueExpectedWhat it catches
0RejectedA missing minimum, or one written as "0 or more"
1AcceptedA minimum written as "more than 1"
2AcceptedA check that compares with == instead of >=: 1 passes, 2 fails
10AcceptedA maximum written as "less than 10"
11RejectedA missing maximum, or one written as "11 or less"
1000RejectedA form with no maximum at all, which matters when seats or stock are limited

The two ends are two separate lines of code, and either can be missing on its own. A form that rejects 11 can still take 0, so test 0 even after 11 came back with an error. An order of 0 tickets has a total of the fee alone, ₪5.00 in a form with a ₪5 fee, and that order may go all the way to payment.

Input that is a number only on paper

The browser's own checks cover part of this. An <input type="number"> with min and max stops the arrow buttons at the limits, but a typed value goes through to the page's own check, and a value sent straight to the server skips both.

Past the field

Once a value is accepted, follow it.

Then the confirmation and the receipt: the quantity should appear there as you entered it, once, as a whole number.

Arrows, typing, paste

There are three ways to put 11 in the field: the arrow up from 10, typing, and paste. Browsers stop the arrow at the maximum and do nothing about the other two. A field that reformats what is typed, cutting it or changing it, does so in a key handler that a pasted value skips, so the two ways give different results. Use each way at least once. After an error, correct the value and check that the message goes away without another submit.

A short set

With five minutes for the field: 0, 1, 10, 11, 2.5, empty, and one order for 11 sent straight to the server.

Try it on a live form. The TicketBox practice form has a quantity field with a stated range. Some sessions have bugs planted at its edges, and some past the field, where only the request shows them.
Open the practice form

More guides: checkout totals · silent failures and stale screens · all guides