SyntaxFix
Write A Post
Hire A Developer
Questions
If you're using HTML5 you don't need to go to any great lengths to perform validation. Just use -
<input type="number" step="any" />
The step attribute allows the decimal point to be valid.