Validation Process Flows

Uniface validation can be initiated by user-initiated events or by ProcScript commands.

The validation process can be influenced by the type of application or component, and by the type of object, such as a field, key occurrence, or entity. For more information, see Validation at Field, Key, Occurrence, or Entity Level and Application Architectures and Validation.

Validation in Server Pages

In web applications, data validation is handled on the server although some validation can also occur on the client before data is submitted to the server. When data is submitted from the browser to the server, occurrences on the web page are reconnected to the database, and the normal validation triggers are fired. For more information, see Data Validation in Web Applications.

Validation in Interactive Forms

For Uniface forms that are run interactively, events that change focus fire event completion triggers such as loseFocus and leaveModified and start implicit validation.

Uniface first checks declarative validation constraints, then activates the validation triggers, followed by their respective event completion triggers:

  • Field: validate->loseFocus
  • Field: validateKey->leaveModifiedKey
  • Entity: validate->leaveModified

For more information, see Data Validation in Interactive Forms.

Validation in Non-Interactive Components

In components that have no user interaction, such as hidden forms and Uniface services, Uniface does not activate the loseFocus and leaveModified triggers in components. These triggers are also not available in dynamic and static server pages, which have no direct connection to a database.

Validation rules are encoded in the validation triggers, which fire regardless of the user interface. You can explicitly start validation by issuing the relevant ProcScript statement. Uniface implicitly starts validation when the store statement is issued.

For more information, see Validation in OLTP Applications.