[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'ValEdit' (#lcl)

# TValueListEditor.ValidateEntry

Validates data entered in a cell in the control.

## Declaration

Source position: valedit.pas line 177

`protected function TValueListEditor.ValidateEntry(`
`const ACol: Integer;`
`const ARow: Integer;`
`const OldValue: string;`
`var NewValue: string`
`):Boolean; override;`

## Arguments

`ACol` |  | Column number for the new value.
`ARow` |  | Row number for the new value.
`OldValue` |  | The old value for the cell.
`NewValue` |  | The new value for the cell.

## Function result

True if the cell value is valid.

## Description

ValidateEntry is an overridden Boolean function used to validate data entered in a cell in the control. The return value is True if NewValue is acceptable for use in the cell at the specified coordinates.

ValidateEntry calls the inherited method, which signals the OnValidateEntry event handler (when assigned). ValidateEntry checks for duplicate names in the Key column when the value KeyUnique is included in the KeyOptions property.

The return value is False if a duplicate Key name is found in Strings. A dialog message is displayed with the message in rsVLEDuplicateKey, and the Editor re-selects the content in the control.