Validation Rules: ----------------- $Id: rules.txt 2 2004-02-29 18:58:13Z schst $ A validation rule is an object that supplies one method to do a complex validation either for a form element or the complete form. patForms will pass the form or element object to the rule. Rules can be applied before or after the built-in validation. Rules allow custom validation like * check if a two passwords match or modify forms like: * set the 'required' attribute based on the value of an element $form->addRule( $myRule, PATFORMS_BEFORE_VALIDATION ); $form->addRule( $myRule, PATFORMS_AFTER_VALIDATION, true ); $element->addRule( $myRule, PATFORMS_AFTER_VALIDATION ); boolean addRule( object rule [, integer type = PATFORMS_AFTER_VALIDATION [, boolean revalidate = false]] ) See the examples for more documentation on rules.