Hello!
I have textfield backed by Integer Model object in the web app and a number
field in the database.
The maximum number the database can hold is less than Integer.MAX_VALUE so I
have added a validator which checks that and reports the valid range.
The problem is that when the user enters a value larger than
Integer.MAX_VALUE, the conversion fails and user recieves a generic message.
Using BigInteger and BigDecimal everywhere in models seems excessive.
And it seems I can't validate the raw input string before conversion? Would
you consider adding this feature or is there a better way?
I have textfield backed by Integer Model object in the web app and a number
field in the database.
The maximum number the database can hold is less than Integer.MAX_VALUE so I
have added a validator which checks that and reports the valid range.
The problem is that when the user enters a value larger than
Integer.MAX_VALUE, the conversion fails and user recieves a generic message.
Using BigInteger and BigDecimal everywhere in models seems excessive.
And it seems I can't validate the raw input string before conversion? Would
you consider adding this feature or is there a better way?