• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/entitypropertyvaluecollection.php
  • Класс: BitrixSaleEntityPropertyValueCollection
  • Вызов: EntityPropertyValueCollection::checkErrors
public function checkErrors($fields, $files, $skipUtils = false)
{
	$result = new Result();

	$fields = File::getPostWithFiles($fields, $files);

	/** @var EntityPropertyValue $propertyValue */
	foreach ($this->collection as $propertyValue)
	{
		if ($skipUtils && $propertyValue->isUtil())
		{
			continue;
		}

		if ($propertyValue->getField('ORDER_PROPS_ID') > 0)
		{
			$key = $propertyValue->getField('ORDER_PROPS_ID');
		}
		else
		{
			$key = "n".$propertyValue->getInternalIndex();
		}

		$value = isset($fields['PROPERTIES'][$key]) ? $fields['PROPERTIES'][$key] : null;

		if (!isset($fields['PROPERTIES'][$key]))
		{
			$value = $propertyValue->getValue();
		}

		$r = $propertyValue->checkValue($key, $value);
		if (!$r->isSuccess())
		{
			$result->addErrors($r->getErrors());
		}
	}

	return $result;
}