-
Bug
-
Resolution: Fixed
-
Normal
-
6.5.8.1, 8.6.0.1, 9.0.0, 9.0.1.2
-
Security Level: Jimmy
-
We are running ZK CE 8.6.0.1 in a SpringBoot app. Also tested it on zkfiddle.org.
We are using MVC with SelectorComposer
-
None
Using the percent format in a decimalbox parsement and validation of negative percent value fails. We were able to track it back to zk.BigDecimal#$toString()
<window>
<decimalbox format="#%"/>
</window>
When using the above zul and entering -3% in the decimalbox on validation it says - from a client error that we should enter a number instead of .-3
In the process a zk.BigDecimal is created with the value -3 and the set its precision to 2. The $toString() call on such a BigDecimal gives an invalid string representation.
var num = new zk.BigDecimal(-3);
num.setPrecision(2);
num.$toString();
// ".-3"