I have one form with two fields. The first field is "ID" and the user has to put an Integer. The second field is "Prize" and the user has to put a float number.
In my validation class I have the following code:
My init binderValidationUtils.rejectIfEmpty(errors,"ID","fieldNu ll","*");
When an user press the button of the form and the fields are empty the form shows:super.initBinder(request,binder);
NumberFormat nf = NumberFormat.getNumberInstance();
binder.registerCustomEditor(Float.class,"Prize", new CustomNumberEditor(Float.class,nf,true));
NumberFormat nf2 = NumberFormat.getIntegerInstance();
binder.registerCustomEditor(Integer.class,"ID", new CustomNumberEditor(Integer.class,nf2,true));
ID -> *
Prize -> Failed to convert propertu value of type lang... bla bla bla
Someone knows the reason? I want to get "*" in a Prize field too.