Not running validation on the numbers in the input type="number"?

Did validation inputŠ° type "TEXT" in js, the pattern used here is this: ^[0-9]+$.
Everything worked perfectly.
Then decided to change the input type to NUMBER and pattern is broken. Input not validated the signs "-" and "+".
What's the catch? Prompt who? As to forbid me to enter the pros and cons in the input of type number ?
April 4th 20 at 13:07
1 answer
April 4th 20 at 13:09
The bottom line is that type="number" recording with two "-" or "+" or "." makes the value empty and based on this, hard pruning is unnecessary.
Therefore, the text is OK, or event - blur.
There is https://jsfiddle.net/kickerock/d2nLqcgh/2/
Damn..maybe even like you.. - wilbert_Roberts commented on April 4th 20 at 13:12
@wilbert_Robertsthat possible?) TTN you described the cause and the solution. Depends on your goals. - Margie_Ki commented on April 4th 20 at 13:15

Find more questions by tags JavaScriptValidation