cancel
Showing results for 
Search instead for 
Did you mean: 

Enabling mandatory validation in HMC

Former Member
0 Kudos

How can I define that an input field is mandatory in HMC? I tried to add the parameter optional="false" to the items.xml:

    <attribute type="valueCode" qualifier="valueCode">
         <modifiers read="true" write="true" optional ="false"/>
         <persistence type="property" />
     </attribute>

But it doesn't work.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi, Felix,

One way is to create an annotation for this attribute.

For example, in the hybris 6.0 core trail, an annotation NotEmptyCuppy created and used to make the field Name not empty. More details steps, please refer to

https://help.hybris.com/6.0.0/hcd/94a4e5bf02a1463287fb3f2f00c6d5d3.html#loio71fa61d3d64545c899f09568...

Regards

Haitao