Buy Now
Sign in

Text field MAX value? (not maxlenght!)

artsapiens , September 23 2021, 12:53
A
artsapiens 105
September 23 2021, 12:53 #397123
Really simple question, but couldn't find the answer here on forum.
Let's say, I have a text field, I've set its validation to "Required" and "Number".
Unfortunately, forum doesn't allow to upload images, so, here is screenshot:
https://snipboard.io/HOAkF3.jpg
How can I set its "max" value?
so that resulting code would look like:
<label for="quantity">Quantity (between 1 and 5):</label>
<input type="number" id="quantity" name="quantity" min="1" max="5">
sample taken from: https://www.w3schools.com/tags/att_input_max.asp
?
GreyHead 65
September 24 2021, 08:31 #397130
Hi artsapiens,
Please try a Regex validation [1-5] with Maxlength 1
Bob
If you'd like to buy me a coffee or two, thank you very much