Data Validation

Uniface validates modified data to ensure that it is correct, meaning that it conforms to the declarative and procedural rules defined by the developer.

Data validation occurs in a specific sequence that is determined by the active path, the type of validation, and the way validation was started. Validation can be initiated explicitly or implicitly.

In declarative validation, Uniface checks the data against constraints in entity and field definitions, such as the data type and field syntax. Uniface always checks declarative constraints before procedural constraints.

In procedural validation, the data is checked to ensure it conforms to constraints that are defined in the validation triggers.

When data is modified, either by the user in an interactive session or by ProcScript instructions, the modified data is validated as soon as there is a need for it. For example, data is always validated when storing data to the database.

You can explicitly start data validation using the ProcScript commands validate, validateocc, validatekey, and validatefield.

Related Topics