<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.7 |
+ | CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2017 |
+ | Copyright CiviCRM LLC (c) 2004-2018 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2017
+ * @copyright CiviCRM LLC (c) 2004-2018
*/
class CRM_Contact_Form_Search_Custom extends CRM_Contact_Form_Search {
// instantiate the new class
$this->_customClass = new $this->_customSearchClass($this->_formValues);
+ $this->addFormRule(array($this->_customClass, 'formRule'), $this);
+
// CRM-12747
if (isset($this->_customClass->_permissionedComponent) &&
!self::isPermissioned($this->_customClass->_permissionedComponent)
}
}
+ /**
+ * Add local and global form rules.
+ */
+ public function addRules() {
+ $this->addFormRule(array($this->_customClass, 'formRule'));
+ }
+
/**
* Set the default values of various form elements.
*