/** * Adds the Rule javascript to the list of current form Rules * * @param HTML_QuickForm2_Rule */ public function addRule(HTML_QuickForm2_Rule $rule) { $this->rules[$this->formId][] = $rule->getJavascript(); }
/** * Adds the Rule javascript to the list of current form Rules * * @param HTML_QuickForm2_Rule $rule Rule instance * @param bool $triggers Whether rule code should contain * "triggers" for live validation */ public function addRule(HTML_QuickForm2_Rule $rule, $triggers = false) { $this->rules[$this->formId][] = $rule->getJavascript($triggers); }