Hello Guys,
I came across a situation where I tried to throw a custom
(more user-friendly) validation message when a required field in a service
is missing. And the service definition was written with auto-attributes,
something like this:
And I found myself stuck as I wanted to throw a custom m
Devanshu,
You can simply try to use override to override the default behavior of
auto-attribute. For example; if you are working on PartyContanctMech and
you want partyId and contactMechId should return custom error message if
empty. Then use the following practice to do that;
Applying same to your example;
Rishi Solanki
Manager, Enterprise Software Development
HotWax Systems Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxsystems.com
On Thu, Oct 13, 2016 at 1:46 PM, Rishi Solanki
wrote:
> Devanshu,
>
> You can simply try to use override
I did think about this few years ago.
It's nice to put a dedicate message, and it's more powerfull to put a
default rule to resolve the label with a pattern like :
Default file for Service error message :
component/config/ServiceErrorLabels.xml
pattern : ServiceValidation.IN.${service-name}