• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/internals/input.php
  • Класс: BitrixSaleInternalsInputEitherYN
  • Вызов: EitherYN::getRequiredError
static function getRequiredError(array $input, $value)
{
	$errors = parent::getRequiredError($input, $value);
	$input['REQUIRED'] ??= 'N';
	if (!$errors)
	{
		if (
			$value === 'N'
			&& $input['REQUIRED'] === 'Y'
		)
		{
			$errors = ['REQUIRED' => Loc::getMessage('INPUT_REQUIRED_ERROR')];
		}
	}
	return $errors;
}