protected function convertRule($rule, $attribute, $type)
	{
		$parsedRule = $this->parseValidationRule($rule);
		$jqueryAttrs = [];
		$ruleMethodName = $this->getRuleMethodName($parsedRule['name']);

		// if method not exists that means it is not implemented yet so return empty array
		if(!method_exists($this, $ruleMethodName))
		{
			return $jqueryAttrs;
		}

		$jqueryAttrs = $this->$ruleMethodName($parsedRule, $attribute, $type);
		
		// if validation messages of laravel is going to be used, convert them too
		if(\Config::get('laravel-to-jquery-validation::useLaravelMessages'))
		{
			$messageMethodName = $this->getMessageMethodName($parsedRule['name']);
			
			// if method not exists, get error message by using default way
			if(!method_exists($this, $messageMethodName))
			{
				$jqueryAttrs = $jqueryAttrs + $this->getErrorMessage($parsedRule['name'], $attribute);
			}
			else
			{
				$jqueryAttrs = $jqueryAttrs + $this->$messageMethodName($parsedRule, $attribute, $type);
			}
		}

		return $jqueryAttrs;
	}
protected function convertRule($rule, $attribute, $type)
	{
		$parsedRule = $this->parseValidationRule($rule);
		$jqueryAttrs = [];
		$ruleMethodName = $this->getRuleMethodName($parsedRule['name']);

		// if method not exists that means it is not implemented yet so return empty array
		if(!method_exists($this, $ruleMethodName))
		{
			return $jqueryAttrs;
		}

		$jqueryAttrs = $this->$ruleMethodName($parsedRule, $attribute, $type);
		
		// if validation messages of laravel is going to be used, convert them too
		if(\Config::get('laravel-to-jquery-validation::useLaravelMessages'))
		{
			$messageMethodName = $this->getMessageMethodName($parsedRule['name']);
			
			// if method not exists, get error message by using default way
			if(!method_exists($this, $messageMethodName))
			{
				$jqueryAttrs = $jqueryAttrs + $this->getErrorMessage($parsedRule['name'], $attribute);
			}
			else
			{
				$jqueryAttrs = $jqueryAttrs + $this->$messageMethodName($parsedRule, $attribute, $type);
			}
		}

		return $jqueryAttrs;
	}
protected function convertRule ( $ rule , $ attribute , $ type ) { $ parsedRule = $ this -> parseValidationRule ( $ rule ) ; $ jqueryAttrs = [ ] ; $ ruleMethodName = $ this -> getRuleMethodName ( $ parsedRule [ 'name' ] ) ; // if method not exists that means it is not implemented yet so return empty array if ( ! method_exists ( $ this , $ ruleMethodName ) ) { return $ jqueryAttrs ; } $ jqueryAttrs = $ this -> $ ruleMethodName ( $ parsedRule , $ attribute , $ type ) ; // if validation messages of laravel is going to be used, convert them too if ( \ Config :: get ( 'laravel-to-jquery-validation::useLaravelMessages' ) ) { $ messageMethodName = $ this -> getMessageMethodName ( $ parsedRule [ 'name' ] ) ; // if method not exists, get error message by using default way if ( ! method_exists ( $ this , $ messageMethodName ) ) { $ jqueryAttrs = $ jqueryAttrs + $ this -> getErrorMessage ( $ parsedRule [ 'name' ] , $ attribute ) ; } else { $ jqueryAttrs = $ jqueryAttrs + $ this -> $ messageMethodName ( $ parsedRule , $ attribute , $ type ) ; } } return $ jqueryAttrs ; }
Converts laravel rules to jquery validation rules

@param array $rules 		Laravel validation rule
Converts laravel rules to jquery validation rules