Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

How to add a maximum limit for tags in dialog field

Avatar

Level 6

<tags
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/coral/common/form/tagfield"
fieldLabel="Tags"
fieldDescription="Let author choose a maximum of five tags"
multiple="{Boolean}true"
name="./tags"
required="{Boolean}true"/>

 

above is the configured dialog, is there any way to limit the author to add only 5 tags.

Thanks in advance.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
3 Replies

Avatar

Community Advisor

Hi @aravindS ,

 

Please refer to the similar thread discussed here and see if it helps: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-to-restrict-number-of-...

 

Regards,

Santosh


Santosh Sai

AEM BlogsLinkedIn


Avatar

Correct answer by
Community Advisor

Avatar

Community Advisor

Hi @aravindS ,

 

Please have a look at a similar thread below.

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/restrict-tag-field-to-max-...

 

Just to give you a highlight, you need to write custom validations to achieve this.

https://medium.com/@ramamity94/easily-achieving-dialog-validations-in-aem-touch-ui-e78106012282

 

I hope it helps!