RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TBaseDataSetAdapterInputField.ValidateValue Method

Validates a new value for this field that appears in the current request.

Pascal
procedure ValidateValue(AActionRequest: IActionRequest; AFieldIndex: Integer);
C++
__fastcall ValidateValue(IActionRequest AActionRequest, int AFieldIndex);

When the parent adapter receives an update request, it calls ValidateValue so that this field can validate the new value from the request message. If ValidateValue raises an exception, the adapter adds the exception message to an Errors object, which can then be used to report the error back to the user. 

AActionRequest is the interface of the action request object. ValidateValue uses this interface to obtain the new value for this field. 

AFieldIndex is the index of this field in the set of fields that AActionRequest maintains. 

ValidateValue calls the ImplValidateValue method, which generates an OnValidateValue event to perform the validation. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!