• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/orm/fields/field.php
  • Класс: Bitrix\Main\ORM\Fields\Field
  • Вызов: Field::appendValidator
protected function appendValidator($validator)
{
	if (!($validator instanceof Validators\Validator) && !is_callable($validator))
	{
		throw new SystemException(sprintf(
			'Validators of "%s" field of "%s" entity should be a Validator\Base or callback',
			$this->name, $this->entity->getDataClass()
		));
	}

	$this->validators[] = $validator;
}