I have a class level constraint designed to validate an address block (streets, city, zip, country, state, county). Everything works great (mostly) but I’m confused about something.
In the UI DTO, I have a member which represents the address block class with the custom annotation. When I validate it everything works (the custom class level constraint calls the field level constraints), BUT:
All of the messages are returned with the property path names prefixed with the getter’s name. I guess I can see why, I just do not know why it is happening per se and more importantly, how can I suppress it because the resulting property path (field name) doesn’t match any field on the form. (It certainly won’t match “getterName.fieldName”!)
Right after the return, I just go through the messages and clean the property path values accordingly and everything is fine.
I just shouldn’t have to do that.