# XTR.XVALIDATE
> [HTML Version](xtr_xvalidate.htm)
_Modified October 2015; see History_
| **Value** | **Description** |
|------|------|
| 1 | Value will be set to 1 if the cell indicated by XTR.XROW and XTR.XCOL needs validation. Previously you had to rely on exitcode -48 to identify when validation was needed, but this is not adequate when the event which terminates an editable cell operation is a click on another control that generates its own exitcode. In that case, the exitcode returned to the application will be that of the clicked-on control, and the XTR.XVALIDATE flag will be handy to indicate that the cell identified by XTR.XROW and XTR.XCOL needs to be validated. |
| 2 | In some cases, the cell which needs to be validated is not the one that last had the focus, i.e. the one referenced by XTR.XROW / XTR.XCOL, but the one which gets the focus, i.e. XTR.TARGETROW / XTR.TARGETCOL. This is often the case with checkboxes, which exit for validation only when checked, and is always the case with read-only editable cells, which exit for validation just before they get the focus. In these cases, XTR.XVALIDATE will be set to 2. |
| 3 | This could have two possible meanings, depending on the context. One possibility occurs when clicking out of a cell that requires post-validation and into a cell that requires pre-validation or validation-on-click, in which case it means that both the XTR.XROW / XTR.XCOL and XTR.TARGETROW / XTR.TARGETCOL cells need validation. The other possibility is that the user selected the \$CBSET, \$CBRST, or \$CBUNDO command from a PopupMenu to set, reset, or undo the state of all the checkboxes in the current column. |
| 4 | Indicates that the user clicked on a \$CBSETDEP or \$CBRSTDEP PopupMenu command to set or reset the dependent checkboxes for the current item. |
| 5 | In an editable tree without validation, a value of 5 indicates that at least one cell was changed during the session. |
See [XTR.TARGET...](xtr_target.htm.md) for some detailed examples of validation scenarios.
**History**
2013 October, A-Shell 6.1.1363: The PopupMenu options \$CBSET, \$CBRST, and \$CBUNDO now return EXITCODE=-48 and XTR.XVALIDATE=3 when validation (conditional or unconditional) is active for the column. \$CBSETDEP and \$CBRSTDEP return XTR.XVALIDATE=4.
2015 October, A-Shell 6.1.1420: Add value 5.