I'm trying to format the value of my input using html5
I want as minimum value 001 , and as maximum value 999. When I type 1, I need the value to be translate in 001. And 10 in 010.
I have to fix the number of digits to 3. That's the same effect that "%03d"
I have checked on internet to find a solution was probably a pattern for my input but after a lot of attempts, I'm still stuck.
I created an interface, and I want to define a specific format for my input of type Number. This format is a format to 3 digits. So if you type 1, the input has to correct the value and translate to 001... or it can keep the old value and forget the wrong one.
input(type="number" min="001" max="999" pattern="xxxx", style="width: 45px ; text-align:center").input-sm#inputDut2-int
I know, or I think at least, that i can solve this with a pattern.