The VALIDATE LIKE attribute applies column attributes defined in the .val database schema files to a field.


VALIDATE LIKE [table.]column
  1. table is the optional table name to qualify the column.
  2. column is the name of the column used to search for validation rules.


Specifying the VALIDATE LIKE attribute is equivalent to writing in the field definition all the attributes that are assigned to table.column in the .val database schema file.

The .val attributes are taken automatically from the schema file if the field is linked to table.column in the field name specification. The VALIDATE LIKE attribute is usually specified for FORMONLY fields.

The VALIDATE LIKE attribute is evaluated at compile time, not at runtime. If the database schema file changes, recompile all your forms.

Even if all of the fields in the form are FORMONLY, the VALIDATE LIKE attribute requires the form compiler to access the database schema file that contains the description of table.


EDIT f001 = FORMONLY.fullname, VALIDATE LIKE customer.custname;