Column Validation File (.val)
The .val database schema file holds functional and display attributes of database table columns.
Description
The .val file holds default attributes and validation rules for database columns.
The form field attribute definition in the .val file is supported for backward compatibility. Do not use this feature in new developments.
In form files, the attributes are taken from the .val file as defaults if
the corresponding attribute is not explicitly specified in the field definition of the ATTRIBUTES
section. The
attributes in the .val file can be considered as a default configuration for a
form field.
In programs, you can validate variable values in accordance with the INCLUDE
attribute by using the VALIDATE
instruction.
The .val file can be generated by fgldbsch from the IBM® Informix® specific syscolval
table, or can be
edited by an external column attributes editor.
This table describes the structure of the .val file:
Pos | Type | Description |
---|---|---|
1 |
STRING |
Database table name. |
2 |
STRING |
Column name. |
3 |
STRING |
Column property name. |
4 |
STRING |
Column property value. |
The supported attribute definitions are:
Attribute Name | Description |
---|---|
AUTONEXT |
Defines the When
this attribute is defined, value is |
CENTURY |
Defines the The
value must be one of: |
COLOR |
Defines the The value is a color identifier (RED, GREEN, BLUE, ...) |
COMMENTS |
Defines the The
value is a quoted string or Localized String ( |
DEFAULT |
Defines the Number,
quoted string or identifier ( |
FORMAT |
Defines the The value is a quoted string. |
INCLUDE |
Defines an include list as the Value
must be a list: |
INVISIBLE |
Defines the When
this attribute is defined, value is |
JUSTIFY |
Defines the The
value must be one of: |
PICTURE |
Defines the The value is a quoted string. |
SHIFT |
Corresponds to the Values
can be |
VERIFY |
Defines the When
this attribute is defined, value is |
Example
customer^customer_name^SHIFT^UP^
customer^customer_name^COMMENTS^"Name of the customer"^
order^order_date^DEFAULT^TODAY^
order^order_date^COMMENTS^"Creation date of the order"^