Hi Vladyslav,

> I don't really understand it, I must be strict, converting to zero
> will lead to wrong calculations.

That's what I said :) Fully agree here, any non-numeric string should throw
an exception.

In summary, I would check that the string matches `
/^[\+\-]?[0-9]+(\.[0-9]+)?$/`or else throw an exception.

- Ben

Reply via email to