public function validate( $variableSet, $nsMgr )
	{
		if ( ! $this->name )
		{
			\XBRL_Log::getInstance()->formula_validation( 'Custom function', 'Custom function name is not defined', array(
				'error' => 'xbrlve:noNameForCustomFunction'
			) );
			return false;
		}

		$qname = $this->getQName();

		if ( $qname->namespaceURI == \XBRL_Constants::$standardPrefixes[ STANDARD_PREFIX_FUNCTION_INSTANCE ] )
		{
			\XBRL_Log::getInstance()->formula_validation( 'Custom function', 'Custom function name has a namespace reserved for functions in the function registry (xfi)', array(
				'signature' => $qname->prefix . ":" . $qname->localName,
				'error' => 'xbrlve:noProhibitedNamespaceForCustomFunction'
			) );
		}

		if ( $this->output )
		{
			$outputQName = qname( $this->output, $nsMgr->getNamespaces() );
			if ( $outputQName && ! \XBRL::startsWith( $this->output, "xs:" ) && $outputQName->namespaceURI != \XBRL_Constants::$standardPrefixes[ STANDARD_PREFIX_SCHEMA ] )
			{
				\XBRL_Log::getInstance()->formula_validation( 'Custom function', 'Custom function outut type is not valid', array(
					'type' => $this->output ? $this->output : "missing",
					'error' => 'xbrlve:invalidDatatypeInCustomFunctionSignature'
				) );
			}
		}

		return true;
	}