Validation/normalization for number of digits

We add in checks for formatNumber options to make sure the options are
valid.