ui.Dialog.validate()

The Validate() method is used to check the values input to the form fields. The syntax of the method reference is:

 

DIALOG.Validate("field_list")

 

The method checks the values according to the parameters specified in INCLUDE, NOT NULL and REQUIRED field attributes. The method returns 0 if the values satisfy all the requirements, otherwise, it returns an error code of the first field which does not.

 

Note, that to avoid inputting wrong data, the current field is always checked, even if it is not mentioned in the Validate() method fields list.

 

If an error occurs during the Validate() method execution, the program performance does not stop. Instead, a corresponding error message occurs and the program finds the next field to where the cursor will move after the program control returns to the interactive process.