Event fired when attempting to leave a control; return value determines if focus can be removed.

Parameters

none

Property of

ColumnEditor, Editor, Entryfield, SpinBox

Description

Use valid to validate data. valid fires when attempting to leave the control only when data has been changed, unless validRequired is true; then valid always fires.

The valid event handler must return true or false. If it returns true, operation continues normally. If it returns false, the validErrorMsg is displayed in a dialog box and the focus remains on the control.

valid does not fire if the user never visits the control, even if validRequired is true. Therefore, unless the control is the first or only control on the form that gets focus, you should always use form-level or row-level validation in addition to control-level or field-level validation.

To enforce a simple numeric range in a SpinBox control, use rangeMax and rangeMin instead of valid.

To perform an action when a control loses focus, use onLostFocus.