CodeCharge Studio

Errors Run-Time Property (PHP)

Applies to

Label Control, TextBox Control, TextArea Control, Checkbox Control, Image Control, ImageLink Control, DatePicker Control, Hidden Control, Connection Control, Grid Form, ListBox Control, CheckboxList Control, RadioButton Control, Record Form, EditableGrid Form, Path Control, Directory Control, FileUpload Control


object (clsErrors)






This property keeps the reference to the objectís errors collection. It is used to collect error messages generated during the objectís execution.


The following example shows how to display an error message on the form if the logged in user tries to delete an item that does not belong to him/her.
global $items;
if ($items->user_id->GetValue() != CCGetUserID())
  $items->DeleteAllowed = false;
  $items->Errors->addError("You are not allowed to delete this item.");
where $items is the name of the form.

Other examples

Display Custom Error Messages,
Using the Control Validation Event,
Using the Form Validation Event

On-line, printable versions and updates