Skip to main content

TcxCustomEditProperties.CanValidate Method

Indicates if the editor supports validation.

Declaration

function CanValidate: Boolean; virtual;

Returns

Type
Boolean

Remarks

When a user enters text and wants to store it as the edit value, it is necessary in some cases to check whether this text can be converted to the edit value. This procedure is called validation. If the text cannot be converted to the edit value, an error occurs, and as a result, the editor fails validation and its edit value is not changed. To handle such cases, the editor must support validation, which is performed by the ValidateDisplayValue method or the editor ValidateEdit function. If the editor supports validation, the CanValidate function returns True. Otherwise, this function returns False.

Use the ValidationOptions property to specify how the editor handles and displays its validation errors.

See Also