Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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...