Expand my Community achievements bar.

Adobe Summit 2025: AEM Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.

Mark Solution

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

SOLVED

custom validation for a cq:widget ( example textfield)

Avatar

Level 2

Hi ,

Is there a way to add the custom validation for my cq:dialog ( example textfield) 

for example I need the author to restrict some words in the text field like "policy", "legal" etc..

Thanks

Samb

1 Accepted Solution

Avatar

Correct answer by
Level 10
You would have to overlay it and add Javascript  logic to add this functionality. You can overlay any cq component and add custom functionality.     

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10
You would have to overlay it and add Javascript  logic to add this functionality. You can overlay any cq component and add custom functionality.     

Avatar

Level 10

Granite UI is simple form. You need to annotating the elements grammer & register a validator checking . Look at details at

http://docs.adobe.com/docs/en/aem/6-0/develop/ref/granite-ui/api/jcr_root/libs/granite/ui/components...