Validate Event

Applies to TestComplete 15.42, last modified on August 01, 2022

Occurs when the in-place editor needs to validate the new value.


Validate(Data) Parameters
Data [in] Required Object
Result     Boolean  


When an in-place editor of a custom keyword test operation displayed in the Keyword Test editor is about to close and the HasChanges event handler reported that changes were made, the Validate event is then raised. When handled, it validates the new value. For example, if the in-place editor is supposed to accept numbers only, the Validate event handler should check if the inputted value corresponds to a number.

The default event handler used by TestComplete always returns True. You can create your own event handler to perform custom validation.


The event has the following parameter:


An object that provides access to the operation fields. This object contains properties that correspond to individual operation fields and whose names coincide with the field names.

Return Value

True if the value in the editor is valid; otherwise False.


If the Validate event handler returned True, the ApplyChanges event then occurs in order for the operation to save the changes made via the in-place editor.

If the event handler returned False, the ValidationMessage event occurs to obtain the description of the validation error that has occurred.

See Also

Events Reference
StartEditing Event
GetEditValue Event
SetEditValue Event
HasChanges Event
ValidationMessage Event
ApplyChanges Event
Creating Keyword Test Operations

Highlight search results