• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/orm/fields/field.php
  • Класс: BitrixMainORMFieldsField
  • Вызов: Field::getTypeMask
public function getTypeMask();

/**
 * @param        $value
 * @param        $primary
 * @param        $row
 * @param Result $result
 *
 * @return Result
 * @throws SystemException
 */
public function validateValue($value, $primary, $row, Result $result)
{
	if ($value instanceof SqlExpression)
	{
		return $result;
	}

	$validators = $this->getValidators();

	foreach ($validators as $validator)
	{
		if ($validator instanceof IValidator)
		{
			$vResult = $validator->validate($value, $primary, $row, $this);
		}
		else
		{
			$vResult = call_user_func_array($validator, array($value, $primary, $row, $this));
		}

		if ($vResult !== true)
		{
			if ($vResult instanceof EntityError)
			{
				$result->addError($vResult);
			}
			else
			{
				$result->addError(new FieldError($this, $vResult, FieldError::INVALID_VALUE));
			}
		}
	}

	return $result;
}