Expand my Community achievements bar.

SOLVED

In Page Property Dialog field Validation

Avatar

Level 7

In Page properties I have added 2 text field and 1 multifield(textfield)

 

For all these textfield I want one validation where it doesn't accept any symbols other than '-' and 'space'. How can I achieve this. What Js to be used.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

please check the below blog for examples on how to set up validation in dialog.

https://aemlab.blogspot.com/2019/05/aem-touch-ui-component-dialog-field.html 

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

please check the below blog for examples on how to set up validation in dialog.

https://aemlab.blogspot.com/2019/05/aem-touch-ui-component-dialog-field.html 

Avatar

Community Advisor

Hi @Ronnie09 ,

You can use Granite Validator for this purpose.

Please refer to the similar reply here - https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager-forms/text-field-content-l...

Here, instead of checking word limit, you can match the word with your required regex and accordingly show an error.

Thanks,

Chitra