• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/internals/input.php
  • Класс: BitrixSaleInternalsInputEnum
  • Вызов: Enum::getErrorSingle
static function getErrorSingle(array $input, $value)  // TODO optimize to getError
{
	$options = $input['OPTIONS'];

	if (is_array($options))
	{
		$options = self::flatten($options);

		return isset($options[$value])
			? array()
			: array('INVALID' => Loc::getMessage('INPUT_INVALID_ERROR'));
	}
	else
	{
		return array('OPTIONS' => Loc::getMessage('INPUT_ENUM_OPTIONS_ERROR'));
	}
}