Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0.0.RC1
-
Fix Version/s: 2.0.1
-
Component/s: Binding: Validation System
-
Labels: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());