What patterns are available for variables in the Template Studio?
In Template Studio, you can set a variable to Single line pattern and apply a mask that determines exactly which characters may be entered and where they can be placed.
Why use patterns?
Patterns (also known as masks) help:
-
enforce consistent formatting
-
prevent errors caused by free form input
-
maintain clean and uniform designs
A common use case is business cards, where phone numbers or email structures must follow a strict layout.
Example patterns for phone numbers:
-
+1 (000) 0000000
-
+31 6 00 00 00 00
-
\0\049 00 00000 0000
Example patterns for other variables:
-
00 00 2\000 for dates
-
aa00 aaaa 0000 0000 00 for bank accounts
Pattern definitions
You can use the following symbols when creating patterns:
-
0 allows any digit
-
a allows any letter
-
* allows any character
-
\ makes the character after it fixed, even if it is normally a mask symbol
Any other characters you enter (spaces, brackets, hyphens, and so on) remain fixed in the final input.
Advanced pattern methods
You can create more complex input rules using the following options:
-
[] make part of the input optional
-
{} include a fixed part in an unmasked value
-
` prevent symbols from shifting back when users type or delete characters
These tools allow you to design highly structured and user friendly input fields for your templates.