Validating form fields with regular expression




I am creating an adaptive form in AEM based on an XDP file. I am having the general problem of understanding the format the validation patterns need to be in. Adobe Designer, where I create the XDP files, seems to have it's own pattern format -

E.G. "text{'('999')' 999-9999}" for validating a US phone number and 'text{OOOOOOOO''}" to validate an email (this does not even work)

Unfortunately, all the built-in examples, as well as the examples in the documentation are based on a set number of characters. I would like to correctly validate all fields (email etc) and also text fields which can have an unlimited number of characters but only have a-z/A-Z characters. I am not able to define that correctly in Designer and also not in AEM on the form field field itself. It says "Regular Expression are permitted." but this seems to be incorrect.

Can someone shed some light on the general validation that is being done in that weird format? 

Any help would be greatly appreciated. 

Thanks. Alex

Accepted Solutions (1)

Accepted Solutions (1)





The above would work if and only if you write an 8 character string and nothing else. This special regex (its not exactly regex) is part of XFA spec and you can study about googling XFA spec.  

I can suggest a simple way that is to write a validation expression that returns true or false if you want validations for the field. 

Answers (0)