X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContact%2FForm%2FSearch%2FCustom.php;h=d6de166cdd94795dbca1b183f7f440eeab1fc92a;hb=15c29ea138b36508e80ae3d674a1ca1c3fdd1c87;hp=e82d7ad71f2ca0bbd36aac4311a79868a8ba1994;hpb=151c31252ae8e92f86f08ecff4716b1d009dca2d;p=civicrm-core.git diff --git a/CRM/Contact/Form/Search/Custom.php b/CRM/Contact/Form/Search/Custom.php index e82d7ad71f..d6de166cdd 100644 --- a/CRM/Contact/Form/Search/Custom.php +++ b/CRM/Contact/Form/Search/Custom.php @@ -1,9 +1,9 @@ _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) @@ -91,6 +93,13 @@ class CRM_Contact_Form_Search_Custom extends CRM_Contact_Form_Search { } } + /** + * Add local and global form rules. + */ + public function addRules() { + $this->addFormRule(array($this->_customClass, 'formRule')); + } + /** * Set the default values of various form elements. *