* @package patForms * @subpackage Rules * @license LGPL * @copyright PHP Application Tools */ /** * patForms Rule MyRule * * This is lust a test to include custom modules, such as rules * * * @author gERD Schaufelberger * @package patForms * @subpackage Rules * @license LGPL * @copyright PHP Application Tools */ class patForms_Rule_MyRule extends patForms_Rule { /** * script that will be displayed only once * * @access private * @var array */ var $globalScript = array(); /** * javascript that will be displayed once per instance * * @access private * @var array */ var $instanceScript = array(); /** * properties that have to be replaced in the instance script. * * @access private * @var array */ var $scriptPlaceholders = array(); /** * name of the rule * * @abstract * @access private */ var $ruleName = 'MyRule'; /** * define error codes and messages for the rule * * @access private * @var array $validatorErrorCodes * @todo translate error messages */ var $validatorErrorCodes = array( "C" => array( 1 => "My Rule failed!", ), "de" => array( 1 => "My Rule failed!", ), "fr" => array( 1 => "My Rule failed!", ) ); /** * method called by patForms or any patForms_Element to validate the * element or the form. * * @access public * @param object patForms form object */ function applyRule(&$element, $type = PATFORMS_RULE_AFTER_VALIDATION) { $this->addValidationError(1); return false; } } ?>