Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.0.0.RC1
-
None
Description
When using the Errors interface for a validator (as opposed to a MessageContext) and its rejectValue method, the actual error is not properly recorded as a field specific error.
Looking around the code I see the MessageContextErrors does this in rejectValue():
messageContext.addMessage(new MessageBuilder().error().code(errorCode).defaultText(defaultMessage).build());
but should probably do this:
messageContext.addMessage(new MessageBuilder().error().source(field).code(errorCode).defaultText(defaultMessage).build());