max length of a String in cnd

Question

How to define the max length of the string property in the CND file?

Answer

The length can be limited with a regular expression. Additionally, you can set specific characters that are allowed in this string. 

For example, the following definition allows a word of seven letters:

 - test (string) < '^[a-zA-Z]{7}$'

Any regular expression can be used to validate the input.