custom validation for a cq:widget ( example textfield) | Community
Skip to main content
Samb
October 16, 2015
Solved

custom validation for a cq:widget ( example textfield)

  • October 16, 2015
  • 2 replies
  • 927 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008
You would have to overlay it and add Javascript  logic to add this functionality. You can overlay any cq component and add custom functionality.     

2 replies

smacdonald2008
smacdonald2008Accepted solution
October 16, 2015
You would have to overlay it and add Javascript  logic to add this functionality. You can overlay any cq component and add custom functionality.     
Sham_HC
October 16, 2015

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/foundation/clientlibs/foundation/js/validation/index.html