• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/UpdateSystem/Coupon.php
  • Класс: BitrixMainUpdateSystemCoupon
  • Вызов: Coupon::isCoupone
public function isCoupone(): bool
{
	if (!preg_match("#^[A-Z0-9]{3}-[A-Z]{2}-?[A-Z0-9]{12,30}$#i", $this->coupon)
		&& !preg_match("#^[A-Z0-9]{3}-[A-Z0-9]{10}-[A-Z0-9]{10}$#i", $this->coupon))
	{
		return false;
	}

	return true;
}