VALIDATE forces Oracle Forms to immediately execute validation processing for the indicated validation scope.
VALIDATE
(validation_scope NUMBER);
Built-in Type:
unrestricted procedure
Enter Query Mode yes
DEFAULT_SCOPE Perform normal validation for the default scope, determined by the runtime platform.
Note: If you change the scope via SET_FORM_PROPERTY(VALIDATION UNIT) and then call VALIDATE(DEFAULT_SCOPE), you will override the default scope as defined in the form module. In this case, Oracle Forms will not validate at the default scope but at the scope defined by SET_FORM_PROPERTY.
FORM_SCOPE Perform normal validation for the current form.
BLOCK_SCOPE Perform normal validation for the current block.
RECORD_SCOPE Perform normal validation for the current record.
ITEM_SCOPE Perform normal validation for the current item.
Note on runtime behavior
If an invalid field is detected when validation is performed, the cursor does not move to that field. Instead, the cursor remains in its previous position.
/*
** Built-in: VALIDATE
** Example: Deposits the primary key value, which the user
** has typed, into a global variable, and then
** validates the current block.
** Trigger: When-New-Item-Instance
*/
BEGIN
IF :Emp.Empno IS NOT NULL THEN
:Global.Employee_Id := :Emp.Empno;
Validate(block_scope);
IF NOT Form_Success THEN
RAISE Form_Trigger_Failure;
END IF;
Execute_Query;
END IF;
END;