I've come up with this regular expression to validate a number which can have Maximum length-13 (including decimal points),Maximum no of decimal points-3,Maximum length of a whole number-12.
^(\d{1,12}([.]\d{1,1})?|\d{1,11}([.]\d{1,2})?|\d{1,10}([.]\d{1,3})?)$
Could anyone tell me if my approach is correct or give me a better solution?
123456789012.3which is a total of 14, but you said "number which can have Maximum length-13 (including decimal points)"... so... it has 12 whole dec. numbers but.3are extras...0.be valid?type="number"in your markup instead of playing with regexes :)