protected function _getValidationRules(Model $model) {
		$cachePath = 'validation_rules_' . $model->alias;
		$cached = Cache::read($cachePath, CAKE_LDAP_CACHE_KEY_CONFIG);
		if ($cached !== false) {
			return $cached;
		}

		$ldapFields = $this->_modelConfigSync->getLdapFieldsInfo();
		if (empty($ldapFields)) {
			return false;
		}

		$ldapField = $this->_getLdapField($model);
		if (empty($ldapField)) {
			return false;
		}

		$result = Hash::get($ldapFields, $ldapField . '.rules');
		if (empty($result)) {
			$result = true;
		}
		Cache::write($cachePath, $result, CAKE_LDAP_CACHE_KEY_CONFIG);

		return $result;
	}
protected function _getValidationRules(Model $model) {
		$cachePath = 'validation_rules_' . $model->alias;
		$cached = Cache::read($cachePath, CAKE_LDAP_CACHE_KEY_CONFIG);
		if ($cached !== false) {
			return $cached;
		}

		$ldapFields = $this->_modelConfigSync->getLdapFieldsInfo();
		if (empty($ldapFields)) {
			return false;
		}

		$ldapField = $this->_getLdapField($model);
		if (empty($ldapField)) {
			return false;
		}

		$result = Hash::get($ldapFields, $ldapField . '.rules');
		if (empty($result)) {
			$result = true;
		}
		Cache::write($cachePath, $result, CAKE_LDAP_CACHE_KEY_CONFIG);

		return $result;
	}
protected function _getValidationRules ( Model $ model ) { $ cachePath = 'validation_rules_' . $ model -> alias ; $ cached = Cache :: read ( $ cachePath , CAKE_LDAP_CACHE_KEY_CONFIG ) ; if ( $ cached !== false ) { return $ cached ; } $ ldapFields = $ this -> _modelConfigSync -> getLdapFieldsInfo ( ) ; if ( empty ( $ ldapFields ) ) { return false ; } $ ldapField = $ this -> _getLdapField ( $ model ) ; if ( empty ( $ ldapField ) ) { return false ; } $ result = Hash :: get ( $ ldapFields , $ ldapField . '.rules' ) ; if ( empty ( $ result ) ) { $ result = true ; } Cache :: write ( $ cachePath , $ result , CAKE_LDAP_CACHE_KEY_CONFIG ) ; return $ result ; }
Return list of validation rules

@param Model $model Model using this behavior
@return bool|string|array Return list of validation rules.
Return True, if rule is not configured, or False of failure.
Return list of validation rules