28.2.5 Why is a Field Value Invalid?

When the cursor leaves a field (either by typing text or by using one of the cursor movement keys), form checks the contents of the field. The type of check done depends on the data type of the field. Integer fields can contain digits, commas, and a minus sign before the first digit for negative numbers. If the contents of an integer field do not conform to the above rules, the error message, "Illegal number", is displayed and the cursor remains in the current field. If a decimal point is entered into an integer field, the error message "Decimal point not allowed" is displayed and the cursor remains in the current field.

Fields containing real values and money values are subjected to tests similar to integer fields. These fields can contain digits, commas and at most one decimal point. If a minus sign appears before the first digit the number is assumed to be negative. If the contents of the field do not conform to the above rules, the error message, "Illegal number", is displayed and the cursor remains in the current field.

Date fields accept a variety of input formats and reformat the date value into a format of mm/dd/yy. Legal input formats are:

mmddyy

mmcddcyy

mcdcyy

dcmmmcyy

dmmmyy

where

mm is a two digit month,

m is a one or two digit month,

mmm is a three letter abbreviation of the name of the month,

dd is a two digit day of the month,

d is a one or two digit day of the month,

yy is a two or four digit year (20th century, 1900, is assumed if a two digit year is used)

c is a separating punctuation charater.

The following examples are all valid inputs for a date of May 9, 1987.

050987 (mmddyy)

05/09/87 (mmcddcyy)

05/09/1987 (mmcddcyy)

9-may-87 (dcmmmcyy)

09MAY1987 (ddmmmyy)

5-9-87 (mcdcyy)

If a date value does not conform to the above formats, or if the date itself is unvalid (i.e., February 30th), the error message, "Illegal date", is displayed and the cursor remains in the current field.

Boolean fields are used to represent the answer to a question (i.e., "Is this a verbal purchase order?". There are only two possible values: yes and no. If the value entered is not yes, no, or some upper and lower case combination of yes and no, the error message "Illegal boolean" is displayed and the cursor remains in the current field.