Skip to Content
Former Member
Aug 12, 2015 at 09:03 PM

Add validation checks to Save button in Backoffice editor-area


Hi all

In one of my item-types I have a list attribute and I want to validate that always there will be at least one item in the list.

     <collectiontype code="myListCode" elementtype="AnyType" autocreate="true" type="list"/>
     <attribute qualifier="myList" type="myListCode">
            <modifiers optional="false"/>
            <persistence type="property"/>

In the create-wizard widget you can control the buttons visibility through the visible attribute as shown below thus enforcing the user to choose at least one item in the list.

 <wz:done visible="newItem.catalogVersion != null and newItem.myList != null">

But when it comes to the editor-area widget you can empty the list and save the changes without a problem.

Is there any way to customise the SAVE button in the action toolbar in editor-area in the same way as in create-wizard?