VDaemon PHP Library | VDaemon Extension | Table of Contents

VDaemon User Guide
VDaemon Setup

Before you begin use VDaemon you need to setup it properly.

Installation

VDaemon comes in zip archive vdaemon.zip. To install VDaemon unpack it to some folder on your web server. It's recommended to unpack it into "<website_root>/vdaemon" folder, in this case installation is completed.

If you unpacked into folder with other name, you need to make some changes to config.php file which can be found in above folder. You should specify path to vdaemon.js file by changing "PATH_TO_VDAEMON_JS" constant, for example, if you unpacked into "<website_root>/scripts/validation" folder, where <website_root> is root folder of your web site, constant declaration should look like:

define('PATH_TO_VDAEMON_JS', '/scripts/validation/vdaemon.js');

Configuration

VDaemon configuration options are located in the config.php file in VDaemon installation folder. Currently it is only 2 options:

PATH_TO_VDAEMON_JS - defines path from your web site root to vdaemon.js file - client-side validation script.

VDAEMON_DELIMITER - In case your form contains several input elements with the same name ending with '[]', after submission PHP makes array from that elements values: $_POST['elements_name'] == array('value1', 'value2', 'value3' ...). VDaemon validators can't validate array type values. Instead VDaemon validates string that is made by joining array elements with delimiter specified by this constant, i.e. string that calculated as: join(VDAEMON_DELIMITER, $_POST['elements_name']). For instance, if delimiter is "~" (default), the string will be: value1~value2~value3...