I need to set -1 as min and max to 10 in number HTML field. from this I need to skip 0.that is I don't need to submit its value as 0. is this possible in HTML?
 <input type="number" min="-1" max="10"> //I need something like skip = 0
                You can add pattern attribute and change type to 'text'
<input type="text"  pattern="[1-9]|10|-1">
demo
The answer is rather simple on this one.
It's not possible with plain html, since there is no skip="" and pattern="" doesn't work on number inputs. You have to use a Javascript function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With