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:

<auto-attributes include="pk" mode="IN" optional="false"/>

And I found myself stuck as I wanted to throw a custom message on a
specific field among the PKs of the entity.

I want you to suggest me a way to set validate message in such situation
like we set on a single attribute like:

<attribute name="shippingContactMechId" type="String" mode="IN"
        <fail-property resource="OrderUiLabels"

IMO, we can think of doing something like the exclude field inside the
auto-attributes to define the validate messages on the fields.

<auto-attributes include="pk" mode="IN" optional="true">
    <exclude field-name=""/>

Something like this:

<auto-attributes include="pk" mode="IN" optional="true">
    <validation-message field-name="shippingContactMechId"

Please share your thoughts. :)

Thanks and Regards,
Devanshu Vyas

Reply via email to