Form Field Quantity Stepper
A pre-composed form field that wraps a Quantity Stepper with automatic label, helper text, and error message display. Inherits from FormFieldBase for EditContext integration, generated control IDs and ARIA wiring.
Default
The label's
for points at the quantity input, and aria-describedby links the group to the helper text. Note the defaults differ from the bare control: Value and Min start at 0 here, not 1.Step and Remove
Step applies to the buttons and the arrow keys, which suits case quantities. Set OnRemove and the decrease button becomes a trash-icon remove action once the value reaches Min — the value does not change, your code removes the line.Read-Only, Disabled and Error
ReadOnly swaps the numeric input for a plain read-only one that stays focusable and turns both buttons off. ErrorText makes the field invalid and hides the helper text.EditForm Validation
Button presses and typed changes both notify the
EditContext, so a [Range] rule reports straight away. Bounds and validation are different tools: Min and Max stop the control going out of range, while the model rule is what fails the submit.