A submit handler belongs on the form, so its behavior also works when the form is submitted from the keyboard. Prevent the default navigation when you are handling submission inside the page. Then validate according to the field contract. A blank string and a deliberate zero are different inputs, even though Number converts both to zero. Checkbox groups add another distinction: collect checked values, not every offered value. You'll submit names, quantities, notification choices, and stable product identifiers. Read the field at submit time so a changed selection is respected. Keep validation messages specific enough to explain what needs fixing.