Open halyson97 opened 6 years ago
Thanks for reporting! It's fine for input,
and in some situations .
, but clearing the field isn't desired. Will look into this bug.
Upon investigation, it seems that there's no way to disable or override <input type="number">
's validation
<input type="number">
elements do not support use of the pattern attribute for making entered values conform to a specific regex pattern. The rationale for this is that number inputs can't contain anything except numbers, and you can constrain the minimum and maximum number of valid digits using the min and max attributes, as explained above.
One potential workaround is to turn <input type="number">
into <input type="text">
, and supply our own pattern
regex.
when adding the symbols "." and "," in an input field of type number, the library retries the message and clears the field