/** * Validates the widget against its set of $rules. Returns false * on failure to pass any rule. * * @access public * @param string $value * @param object $form * @param object $cgi * @return boolean * */ function validate($value, $form, $cgi) { if ($this->ignoreEmpty && (empty($cgi->{$this->name}) || !isset($cgi->{$this->name}))) { return true; } else { return parent::validate($value, $form, $cgi); } }