src/ItePHP/Action/ArgumentEvent.php
private function validateUrl(Request $request , ConfigContainer $config , $position){
		$url=$request->getUrl();
		$default=$config->getValue('default');
		if(preg_match('/^'.$config->getValue('pattern').'$/',$url,$matches) && isset($matches[1])){
			return $matches[1];			
		}
		else if($default!==false){
			return $config->getValue('default');
		}
		else{
			throw new RequiredArgumentException($position,$config->getValue('name'));
		}
	}
private function validateUrl(Request $request , ConfigContainer $config , $position){
		$url=$request->getUrl();
		$default=$config->getValue('default');
		if(preg_match('/^'.$config->getValue('pattern').'$/',$url,$matches) && isset($matches[1])){
			return $matches[1];			
		}
		else if($default!==false){
			return $config->getValue('default');
		}
		else{
			throw new RequiredArgumentException($position,$config->getValue('name'));
		}
	}
Validate url.

@param Request $request
@param ConfigContainer $config argument
@param int $position
@return string
@throws RequiredArgumentException