Hi,
I am using the org.springframework.batch.item.validator.SpringVal idator along with org.springmodules.validation.valang.ValangValidato r.
This is as shown in the spring batch tutorial of validating errors.
Validating Input
I am able to do validation successfully. But I have problem in getting the error messages. I get a org.springframework.batch.item.validator.Validatio nException and then when i try to do e.getMessage(), I am not getting the error messages in a friendly way, I am getting it something like this
Validation failed for com.sample.example.model.VariableField@35c41b:
Field error in object 'item' on field 'variableDataValue': rejected value []; codes [variableDataValue.item.variableDataValue,variableD ataValue.variableDataValue,variableDataValue.java. lang.String,variableDataValue]; arguments []; default message [variable.data.value.required]
The value i am expecting is just the key "variable.data.value.required"
Is there any way to get only the keys?
Thanks
Venkatesh


Reply With Quote
