Mask should only be used with blocks that collect data online. Other UI control type commands, like dropdown, radio, inline, paragraph, cascade, table, etc should not appear within its definition.
This command will display a special type of text box to the customer where a mask (as described below) is enforced.
Masks characters:
Mask Element | Description |
# | Digit or space (optional). If this position is blank in the mask, it is rendered as a prompt (underscore) character. |
L | Uppercase letter (required). Restricts input to the ASCII letters A-Z. |
l | Lowercase letter (required). Restricts input to the ASCII letters a-z. |
a | Accepts any character. If this position is blank in the mask, it is rendered as a prompt (underscore) character. |
<n..m> | Restricts the user to an integer in the declared numeric range. Numeric range mask parts can occupy multiple positions. |
<Option1|Option2|Option3> | Restricts the user to one of a fixed set of options. The pipe("|") serves as a separator between the option values. |
\ | Escape character, allowing the following character to act as literal text. For example "\a" is the character "a" rather than including a free mask part. "\\" is the literal back slash character. |
Any other characters | All non-mask elements appear as themselves. Literals always occupy a static position in the mask at run time, and cannot be moved or deleted by the user. |
Examples:
Type | Mask |
Phone | (###) ### - #### |
IP Address | <0..255>.<0..255>.<0..255>.<0..255> |
Credit Card Number | ####-####-####-#### |
Zip Code | #####-#### |
Postal Code | L#L #L# |
Custom | #####-###-##### |
For complex conditions another string can be appended to the Mask separated by :::: to hold a standard Regular Expression (RegEx) that will be applied to the input box. By default, the application will automatically create the RegEx expression required. For example: Entering #####-#### is equivalent to #####-####::::\d\d\d\d\d\-\d\d\d\d
The second part of the string is generated automatically in the first case. This feature is always turned on. To turn it off add * after the ::::
For example: #####-####::::* tells the application to enforce the mask while entering but the user need not enter all the characters in the mask.
For simple Regex use status not mask and value is regex=value of regex. I.E. for email address use regex=^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article