• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/restservice.php
  • Класс: BitrixBizprocRestService
  • Вызов: RestService::validateActivityProperties
static function validateActivityProperties($properties)
{
	if (!is_array($properties))
		throw new RestException('Wrong properties array!', self::ERROR_ACTIVITY_VALIDATION_FAILURE);

	foreach ($properties as $key => $property)
	{
		if (!preg_match('#^[a-z][a-z0-9_]*$#i', $key))
			throw new RestException('Wrong property key ('.$key.')!', self::ERROR_ACTIVITY_VALIDATION_FAILURE);
		if (empty($property['NAME']))
			throw new RestException('Empty property NAME ('.$key.')!', self::ERROR_ACTIVITY_VALIDATION_FAILURE);
	}
}