Hi,
Does anyone know how to use the validator in such a way that you can programatically customize the description of the field without using a message resources bundle?
I know the name of the field at runtime.
For example
Code:
Acct valueObject = new Acct();
valueObject.setAccountNumber(new Long(-5));
classValidator.getInvalidValues(valueObject);
where accountNumber is defined as
Code:
@Min(value=0)
private Long accountNumber;
and the error that is coming back is
Code:
accountNumber must be greater than or equal to 0
But what i really want is
Code:
myCustomDescription must be greater than or equal to 0
Thanks...