Input masks allows you to control user input, standardise field content and avoid syntax errors.
Masks are simple to create and powerful to use. See the following list for details:
! | If a ! character appears in the mask, optional characters are represented in the text as leading blank spaces. If a ! character is not present, optional characters are represented in the text as trailing blank spaces. | |
> | If a > character appears in the mask, all characters that follow are in uppercase until the end of the mask or until a < character is encountered. A < character must be followed by a character mask such as "L", "I", "A", or "a". For instance, if the mask contains ">LLL" and the user enters "abc", the value will be displayed as "ABC". | |
<</b> | If this character is present in the mask, all characters that follow are in uppercase until the end of the mask or until a > character is encountered. A > character must be followed by a character mask such as "L", "I", "A", or "a". For instance, if the mask contains "<LLL" and the user enters "ABC", the value will be displayed as "abc". | |
<> | If these two characters appear together in a mask, no case checking is done and the data is formatted in the same case the user used to enter the data. | |
\ | The character that follows a \ character is a literal character. Use this character to use any of the mask special characters as a literal in the data. For instance, if you want a code to be preceded by a "CODE-" label followed by 6 numbers, the mask will be: \C\O\D\E\-000000 |
| L | The L character requires an alphabetic character only in this position. For the US, this is A-Z, a-z. |
l | The l character permits only an alphabetic character in this position, but doesn't require it. | |
A | The A character requires an alphanumeric character only in this position. For the US, this is A-Z, a-z, 0-9. | |
a | The a character permits an alphanumeric character in this position, but doesn't require it. | |
C | The C character requires an arbitrary character in this position. | |
c | The c character permits an arbitrary character in this position, but doesn't require it. | |
0 | The 0 character requires a numeric character only in this position. | |
9 | The 9 character permits a numeric character in this position, but doesn't require it. | |
# | The # character permits a numeric character or a plus or minus sign in this position, but doesn't require it. |
: | The : character is used to separate hours, minutes, and seconds in time expressions. If the character that separates hours, minutes, and seconds is different in the regional settings of the Control Panel in your system, that character is used instead. | |
/ | The / character is used to separate months, days, and years in dates. If the character that separates months, days, and years is different in the regional settings of the Control Panel setting on your system, that character is used instead. | |
; | The ; character is used to separate the three fields of the mask. | |
_ | The _ character automatically inserts spaces into the text. When the user enters characters in the field, the cursor skips the _ character. |
Any character that does not appear in the preceding table can appear in the first part of the mask as a literal character. Literal characters must be matched exactly when control data are entered. They are inserted automatically, and the cursor skips them during input. Special mask characters can also appear as literal characters if preceded by a back-slash character (\).