According to html5.org, the \"number\" input type\'s \"value attribute, if specified and not empty, must have a value that is a valid floating point number.\"
This worked for me and i think is the easiest way to make the input field accept any decimal number irrespective of how long the decimal part is.
Step attribute actually shows the input field how many decimal points should be accepted.
E.g, step="0.01" will accept only two decimal points.