Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxCustomEditProperties.CanValidate Method

Indicates if the editor supports validation.

#Declaration

Delphi
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