Expandir minha barra de realizações na Comunidade.

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

Mark Solution

Esta conversa foi bloqueada devido à inatividade. Crie uma nova publicação.

SOLUCIONADO

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 Solução aceita

Avatar

Resposta correta de
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.     

Ver solução na publicação original

2 Respostas

Avatar

Resposta correta de
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...