|
|
|
|
|
- Overview
- Default display masks
- Preset masks
- Text masks
- "Text and digit" masks
- "Computer" masks
- "Phone number" masks
- "Company/Bank" masks
- "Social security number" masks
- "Zip code" masks
- Custom input masks
- File input mask
The Text field: Edit control and display masks
WINDEV, WEBDEV and WINDEV Mobile propose two types of masks: - the input masks that define the characters that can be typed in the controls found in a window or in a page. Sometimes, these masks can also be used to modify the case (uppercase/lowercase characters) of the values assigned to the window controls or to the page controls programmatically.
- the display masks that define the characters that can be printed in the controls found in a report.
In a window, a page or a report, no input mask (or display mask) is associated by default with a text control. You can: - select a preset input mask.
- create a custom input mask.
Note: If the field is linked to an item, the value stored in the file will be the value displayed. The following masks are proposed by WINDEV, WINDEV Mobile or WEBDEV (in the order in which they appear in the window editor or in the page editor): Text masks | | | | Selected mask | Effects during the input in the control | Effects during the assignment programmatically | Examples |
---|
None | No input mask | No display mask | | 1st letter in uppercase | If the first character typed is a letter, this letter will be displayed in uppercase. All the characters can be typed. | If the first character typed is a letter, this letter will be displayed in uppercase. All the characters are allowed. | | All in uppercase letters | All the letters will be displayed in uppercase. All the characters can be typed. | All the letters will be displayed in uppercase. All the characters are allowed. | | All in lowercase letters | All the letters will be displayed in lowercase. All the characters can be typed. | All the letters will be displayed in lowercase. All the characters are allowed. | | Letters | Only the letters (uppercase or lowercase) can be typed. | All the characters are allowed. | | Uppercase letters | Only the letters can be typed. These letters will be automatically displayed in uppercase. Note: Two types of mask exist: with or without accent. | All the letters will be in uppercase. All the characters are allowed. | |
"Text and digit" masks | | | | Selected mask | Effects during the input in the control | Effects during the assignment programmatically | Examples |
---|
Digits | Only the digits and the ' ' character (space) can be typed. | All the characters are allowed. | | Letters + digits | Only the letters (uppercase or lowercase) and the digits can be typed. | All the characters are allowed. | | Uppercase letters + digits | Only the letters and the digits can be typed. The letters will automatically be displayed in uppercase. | All the letters will be displayed in uppercase. All the characters are allowed. | | Letter then Letter/Digit (WINDEV and WINDEV Mobile only) | The first character is necessarily a letter (uppercase or lowercase), then the other characters are letters (uppercase or lowercase) and/or digits. | All the characters are allowed. | | Letter then Letter (CAP)/Digit (WINDEV and WINDEV Mobile only) | The first character is necessarily a letter in uppercase, then the other characters are letters in uppercase and/or digits. | All the characters are allowed. | | Numbers,.+-' ' | Only the following elements can be typed:- the digits.
- the characters:
- ', ' (comma),
- '.' (dot),
- '+' (plus sign),
- '-' (minus sign),
- ' ' (space).
| All the characters are allowed. | | Roman numeral | Only the letters used for the roman numerals can be typed. | All the characters are allowed. | |
"Computer" masks | | | | Selected mask | Effects during the input in the control | Effects during the assignment programmatically | Examples |
---|
Name and full path of a file | All the characters can be typed. up to 260 characters. | All the characters are allowed. up to 260 characters. | - C:\MyDoc\File.DOC
- \\Post4\Test.TXT
| Name of a file (without its path) | All the characters can be typed. up to 260 characters. | All the characters are allowed. up to 260 characters. | | Email address (syntactic validation only) | Any character can be entered except:- '(' (opening bracket),
- ')" (closing bracket),
- '<' (less than),
- '>' (greater than),
- ', ' (comma),
- ';' (semicolon),
- ':' (colon),
- '\' (backslash),
- ' " ' (quote),
- ' ' (space).
The '@' character can be found once only. | All the characters are allowed. | - Julia@yahoo.com
- Anthony@hotmail.com
| Email address (strict validation of domain) | Same restrictions as for the syntactic check of an email address. Checks the syntax of the email address as well as the TLD (Top Level Domain) in relation to the list of existing TLDs (see EmailCheckAddress). | All the characters are allowed. | - Julia@yahoo.com
- Anthony@hotmail.com
| Multiple email addresses (syntactic validation only) | Same restrictions as for the syntactic check of an email address. The addresses must be separated by the ";" character. | All the characters are allowed. | - Julia@yahoo.com;Antoine@hotmail.com
| Multiple email addresses (strict validation of domain) | Same restrictions as for the strict check of an email address. The addresses must be separated by the ";" character. | All the characters are allowed. | - Julia@yahoo.com;Antoine@hotmail.com
| IPv4 address | Only the digits and the dots can be typed. | All the characters are allowed. | | IPv6 address | Only the digits and the ":" characters can be typed. | All the characters are allowed. | | MAC address | Only the digits, the letters and the ":" characters can be typed. | All the characters are allowed. | | 128-bit UUID (no spacing) | Only digits and letters can be typed. | All the characters are allowed. | - 29ea9852143a46a4842aca811e5f8597
| 128-bit UUID (dashes) | Only digits, letters and "-" characters can be typed. | All the characters are allowed. | - 29ea9852-143a-46a4-842a-ca811e5f8597
| 128-bit UUID (braces) | Only digits, letters and "{}" and "-" characters can be typed. | All the characters are allowed. | - {29ea9852-143a-46a4-842a-ca811e5f8597}
| 256-bit UUID (no spacing) | Only digits and letters can be typed. | All the characters are allowed. | - c5c9b31729278ad9da1efc44
c437b7d85b57060f41e2bf 4d0e112eadb77a6d0b
|
"Phone number" masks | | | | Selected mask | Effects during the input in the control | Effects during the assignment programmatically | Examples |
---|
Phone number | Only the following elements can be typed:- the digits.
- the characters:
- '.' (dot),
- '-' (dash),
- '(' (opening bracket),
- ')" (closing bracket),
- ' ' (space).
| All the characters are allowed. | - (33)4.58.69.76.21
- 03 95 87 12 35
| French phone number | Only the following elements can be typed:- the digits.
- the characters:
- '.' (dot),
- '-' (dash),
- ' ' (space).
The entered value is automatically using the "XX.XX.XX.XX.XX" format. | All the characters are allowed. The assigned value is automatically using the "XX.XX.XX.XX.XX" format. | - 04.58.69.76.21
- 03.95.87.12.35
| Swiss phone number | Only the following elements can be typed:- the digits.
- characters: ' ' (space).
The entered value is automatically using the "0XX XXX XX XX" format. | All the characters are allowed. The assigned value is automatically using the "0XX XXX XX XX" format. | - 041 450 12 12
- 051 250 22 22
| Belgium phone number | Only the following elements can be typed:- the digits.
- characters: ' ' (space).
The entered value is automatically using the "0ZZ XX XX XX" or "0Z XXX XX XX" format where Z (or ZZ) corresponds to the dialing code of the area. The area code usually corresponds to 2 digits, except in large conurbations where only 1 digit is required: Brussels: 2, Antwerp: 3, Liège: 4, Ghent: 9. | All the characters are allowed. The assigned value is automatically using the "0ZZ XX XX XX" or "0Z XXX XX XX" format. | | Canadian phone number | Only the following elements can be typed:- the digits.
- the characters:
The value typed is automatically using the "XXX CCC-CCCC" format where XXX corresponds to the regional code and CCC-CCC to the local number. | All the characters are allowed. The assigned value is automatically using the "XXX CCC-CCCC" format. | |
"Company/Bank" masks | | | Selected mask | Effects during the input in the control | Effects during the assignment programmatically |
---|
SIREN number | Only 8 digits can be typed. The ninth digit corresponds to a checksum number (calculated according to the Luhn algorithm). It is automatically proposed. | All the characters are allowed. | SIRET number | 12 digits can be typed. The thirteenth digit corresponds to the checksum number (calculated according to the Luhn algorithm). It is automatically proposed. | All the characters are allowed. | IBAN number | International bank account number containing 2 letters, 2 digits (control key) and the account number on 30 digits | All the characters are allowed. | French RIB number | French bank account number on 23 characters: - 5 digits (bank code),
- 5 digits (branch number),
- 11 digits or letters (account number),
- 2 digits (RIB key)
| All the characters are allowed. | Visa or MasterCard bank card | 16 digits. | All the characters are allowed. Up to 16 characters. | American Express bank card | 15 digits. | All the characters are allowed. Up to 15 characters. |
"Social security number" masks | | | | Selected mask | Effects during the input in the control | Effects during the assignment programmatically | Examples |
---|
INSEE number (see the note below) | Only the digits can be typed. The first number always corresponds to a '1' or to a '2'. Up to 13 digits. | All the characters are allowed. Up to 13 characters. | - 2790221241598
- 1590866795412
| INSEE number + Key (see the note below) | Only the digits can be typed. The first number always corresponds to a '1' or to a '2'. Up to 15 digits. | All the characters are allowed. Up to 15 characters. | - 279022124159875
- 159086679541259
| The identification numbers used by other countries are also available in WINDEV, WINDEV Mobile and WEBDEV. | Reminder: The INSEE number uniquely identifies a person.. This number contains: - gender (1: Male, 2: Female),
- the last two digits of the year of birth,
- the month of birth,
- the region of birth,
- the INSEE number corresponding to the city of birth,
- the order number corresponding to the rank of the birth registration on the city records.
The INSEE number can be completed by a two-digit number called "Key". This key is used to check the validity of the INSEE number.
"Zip code" masks The postal code numbers used by other countries are also available in WINDEV, WINDEV Mobile and WEBDEV. Attention: In an control of type Text of an report, only the predefined masks "1st letter uppercase", "All uppercase" and "All lowercase" are managed. The custom masks can be described via the following characters: - 9': single digit
- C': number or space
- L': capital letter
- l': lowercase letter
- A': upper-case alphanumeric character
- a': lower-case alphanumeric character
- '?': any character
Any other character is reproduced as it is. Therefore, the masks are never wrong. Caution: Custom input masks are only applied to characters entered.. These masks are not applied to the initial values or to the values assigned programmatically. Remark: It is possible to describe a Numerical mask in an control Text. The value retrieved will be a numeric character string and not a numeric value. For example: For a license plate, the mask 'CCCC LL 9A' (9A for departments 2A and 2B) will give a result in the form "1245 QD 34". In the case of a "file path" input mask, a help for entering a file path can be enabled during runtime thanks to the "Assisted input of file path" check box below the mask choice:
Remarks: - This mask is only available for a text control.
- This mask cannot be applied on the initial value or on the value assigned programmatically.
- This option will be ignored if the assisted input on data is enabled.
 This type of mask is not available.
Related Examples:
|
Unit examples (WINDEV): Advanced input mask
[ + ] Handling the input masks in WINDEV: - Defining the format of positive/negative number in a numeric edit control - Defining how negative numbers will be displayed in a numeric edit control - Defining how the value 0 will be displayed in a numeric edit control - Using a regular expression to prevent from typing characters other than 1, 2, 3, 4, 5 and 6. - Using a regular expression to "regulate" the input of a French registration number
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|