AEM 6.2 Touch UI validations

In this article, I am going to cover how to perform validations in AEM 6.2 Touch UI dialogs, in AEM 6.2 the dialog validation framework is changed, we need to use Granite UI foundation registry API’s

I am going to take simple regex validation on textfield , the textfield should allow only alphabets when content authors tries to enter numerics or special symbols it should throw error message

First thing which I am going to do is add a selector  property at component level,here I am going to take OOTB page title field to perform regex validation

Go to the title node of page component and add “validation=regex.validation” property, using this property we are going to find out object of text field in javascript


Next, create client library folder and the type for this is cq:ClientLibraryFolder and add a String property categories with value cq.authoring.dialog and dependencies value underscore

Create a file validations.js and add below code

Now, go to the page properties  and try to add numerics or special symbols, you must see error message something like below