Spring Validation - is it possible to put parameter in messages?
I am using Spring Validation to validate my model objects in the controller. Currently I have a Application object containing a List<Client> field. The when the validation validates the List of Client objects, it often display same message multiple times as many Client objects has the same field empty. I don't think Spring allow you to modify the message because defaultMessage is final in MessageSourceResolvable. So my question is, is there a way to put parameter into the message in the first place instead of hard code the message. for example, instead of "Phone Number is Required" I want to put "Phone Number is Required for John". Any work around is appreciated.