You can specify different validation types for the Validation Text Field widget. For example, you can specify a credit card validation type if the text field will receive credit card numbers.
Validation type |
Format |
---|---|
None |
No particular format required. |
Integer |
Text field accepts numbers only. |
|
Text field accepts e-mail addresses that contain @ and a period (.) that is both preceded and followed by at least one letter. |
Date |
Formats vary. Make your selection from the Format pop-up menu of the Property inspector. |
Time |
Formats vary. Make your selection from the Format pop-up menu of the Property inspector. (“tt” stands for am/pm format; “t” stands for a/p format.) |
Credit Card |
Formats vary. Make your selection from the Format pop-up menu of the Property inspector. You can choose to accept all credit cards, or specify a particular kind of credit card (MasterCard, Visa, etc.). The text field does not accept spaces in credit card numbers, i.e. 4321 3456 4567 4567. |
Zip Code |
Formats vary. Make your selection from the Format pop-up menu of the Property inspector. |
Phone Number |
Text field accepts phone numbers formatted for U.S. and Canada (000) 000-0000 or custom formats. If you select custom format as an option, enter the format, for example, 000.00(00), in the Pattern text box. |
Social Security Number |
Text field accepts social security numbers formatted as 000-00-0000. |
Currency |
Text field accepts currency formatted as 1,000,000.00 or 1.000.000,00. |
Real Number/Scientific Notation |
Validates various kinds of numbers: integers (for example, 1); float values (for example, 12.123); and float values in scientific notation (for example, 1.212e+12, 1.221e-12 where e is used as a power of 10). |
IP Address |
Formats vary. Make your selection from the Format pop-up menu of the Property inspector. |
URL |
Text field accepts URLs formatted as http://xxx.xxx.xxx or ftp://xxx.xxx.xxx. |
Custom |
Lets you specify a custom validation type and format. Enter the format pattern (and hint if desired) in the Property inspector. |