• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/entity/validator/length.php
  • Класс: BitrixMainEntityValidatorLength
  • Вызов: Length::__construct
public function __construct($min = 1, $max = null, $errorPhrase = array('MIN' => null, 'MAX' => null))
{
	if ($min !== null)
	{
		if (!is_int($min))
		{
			throw new ArgumentTypeException('min', 'integer');
		}

		$this->min = $min;
	}

	if ($max !== null)
	{
		if (!is_int($max))
		{
			throw new ArgumentTypeException('max', 'integer');
		}

		$this->max = $max;
	}

	if (!empty($errorPhrase['MIN']))
	{
		$this->errorPhraseMin = $errorPhrase['MIN'];
	}

	if (!empty($errorPhrase['MAX']))
	{
		$this->errorPhraseMax = $errorPhrase['MAX'];
	}

	parent::__construct();
}