score:0

according to the docs:

value = floating-point number
a string representing a number.

and, if you go further, to the spec for floating point, you'll note you can't have any other characters.

to achieve the desired behaviour you can use the pattern attribute and specify a regex, e.g.

<input pattern="\d+((\.|,)\d+)?" />

the regex:

\d+((\.|,)\d+)?

allows digits (\d), then an optional part:
either a dot or a comma (.|,) and more digits \d+.


Related Query

More Query from same tag