I have some custom validation code, which includes a $formatter. (I store currency in pence for correctness, but display in pounds.pence.)
If the user types \'10\'
10.00 === 10 true
10.00 === 10
a=10.00
console.log(a) 10
console.log(a)
.00 don't means anything on javascript, because of this your 10.00 are becoming 10
I suggest to make the value a String so you can create the format that you want