A 20-digit number is usually too large for the native numeric type of JavaScript, so you will need to find a "large number" package to use. Here the one I saw is mentioned in Qaru and looks interesting: http://silentmatt.com/biginteger/
These are just integers. If you need decimals, you have to find something else.
If you just want to verify that the 20-digit string looks like a number and you don't need to know the value, you can do this with a regular expression.