Showing price in javascript validation error code

Hi all

Wondering how most folk handle questions where currency/price is needed. I am making it just one numeric field with a regular expression to make sure no more than two decimals are entered. (Would be great if I could get something better to work - ie a rule that says you either put in no decimals or are forced to two but there you go - it's the zeros).

Problem, of course, is how zero is handled. A person can enter 1.50 but it is stored at 1.5. And if I want my error message to include reference to that amount (maybe they can't enter less than what they entered in a previous question) it just looks weird. I have tried this:


var expect = parseFloat([% B1j %]);
var expdisp = SSI_PriceFormat(expect,",",".");


but that doesn't work. Any ideas? (I'm on 8.4.4 currently).

Resolved