2
I am creating a small shop that will sell shirts of an event and the sale of shirts will be limited to a maximum of 4 shirts per person, so I need that in the field where the number of shirts that the person wants to buy is set to 4.
With input type number I can set this value but if one type the value instead of using the control created by the field it can easily add a higher value.
How do I make the field only accept values 1, 2, 3 or 4 remembering that the minimum value is 1 and the maximum is 4
I tested this but it does not work as I explained, try to put the value by hand without using the field arrows, you can easily put a value out of specified (9 for example)
– Dark Media
@Darkmedia But the form is not sent if the input is invalid. You can test here putting a value above 4 and trying to send.
– Renan Gomes