Fix bug when allowDecimals is false

Disallow direct input of "." and "," if allowDecimals is false.
Only "-" and numbers are allowed.
Merge pull request #2 from loicfevrier/patch-1

Fix bug when allowDecimals is false