How to validate a decimal field

How to validate a decimal field

This may be a dumb question.

I have 2 decimal fields and a formula field.

If you enter a , in the decimal field the formula field displays null.

On the input script how can I validate the input as a decimal field (i.e. stop people entering anything but numbers?)

Thanks for your help in advance.