After my form backing object is validated I have a BindingResult, which contains a list of FieldError. Each FieldError has a defaultMessage. How is that message set and why doesn't it use my Spring MessageSource? I would like that default message to be derived from my Spring's MessageSource.
EDIT: I see that the error codes are being set correctly in the FieldError object. It's just the default message in that object is not coming from my MessageSource. For instance, when I enter a string for a field that is an int I want it to get my message from messages.properties:
typeMismatch=Invalid type was entered.
The only way I can get that message is if I take my FieldError object and pass it into the MessageSource manually like so:
messageSource.getMessage(fieldError, null); // This gets my message from messages.properties.