-
Bug
-
Resolution: Fixed
-
Normal
-
7.0.7, 8.0.2
-
None
-
Security Level: Jimmy
-
None
-
ZK 8.0.3 S3
-
None
From a user's perspective, the value is 0.001 instead of 0.
steps to reproduce
- load the attached zul
- click the button
actual result
the message "error number is not allowed" shows
expected result
no error message shows.
workaround
Specify format with more precise pattern.
<doublebox id="db" constraint="no zero" format="#.###" />
root cause
getValue() calls checkUserError(), and it validates the value by coerceToString(value) according to default format #.#. So the value it gets is 0.0 which violates the constraint.
It's better to validate the real value without converting to a string first.
- links to