Digits constraint won't work with fractions

14 views
Skip to first unread message

Ignacio Serrano

unread,
Feb 7, 2013, 12:11:16 PM2/7/13
to gwt-val...@googlegroups.com
It doesn't matter how many fractional digits you specify because what DigitsNumberValidator does with your number is:

        String valueString = Double.valueOf(value.doubleValue()).toString();
       
So numbers like 4.59 will automatically get infinite decimals even if the field / property being validated is BigDecimal.

Doesn't make much sense to use a digit validator that adds extra digits to make validations, don't you think?
Reply all
Reply to author
Forward
0 new messages