src/Javascript/RuleParser.php
public function getRule($attribute, $rule, $parameters, $rawRule)
    {
        $isConditional = $this->isConditionalRule($attribute, $rawRule);
        $isRemote = $this->isRemoteRule($rule);

        if ($isConditional || $isRemote) {
            list($attribute, $parameters) = $this->remoteRule($attribute, $isConditional);
            $jsRule = self::REMOTE_RULE;
        } else {
            list($jsRule, $attribute, $parameters) = $this->clientRule($attribute, $rule, $parameters);
        }

        $attribute = $this->getAttributeName($attribute);

        return [$attribute, $jsRule, $parameters];
    }
public function getRule($attribute, $rule, $parameters, $rawRule)
    {
        $isConditional = $this->isConditionalRule($attribute, $rawRule);
        $isRemote = $this->isRemoteRule($rule);

        if ($isConditional || $isRemote) {
            list($attribute, $parameters) = $this->remoteRule($attribute, $isConditional);
            $jsRule = self::REMOTE_RULE;
        } else {
            list($jsRule, $attribute, $parameters) = $this->clientRule($attribute, $rule, $parameters);
        }

        $attribute = $this->getAttributeName($attribute);

        return [$attribute, $jsRule, $parameters];
    }
public function getRule ( $ attribute , $ rule , $ parameters , $ rawRule ) { $ isConditional = $ this -> isConditionalRule ( $ attribute , $ rawRule ) ; $ isRemote = $ this -> isRemoteRule ( $ rule ) ; if ( $ isConditional || $ isRemote ) { list ( $ attribute , $ parameters ) = $ this -> remoteRule ( $ attribute , $ isConditional ) ; $ jsRule = self :: REMOTE_RULE ; } else { list ( $ jsRule , $ attribute , $ parameters ) = $ this -> clientRule ( $ attribute , $ rule , $ parameters ) ; } $ attribute = $ this -> getAttributeName ( $ attribute ) ; return [ $ attribute , $ jsRule , $ parameters ] ; }
Return parsed Javascript Rule.

@param string $attribute
@param string $rule
@param $parameters
@param $rawRule
@return array
Return parsed Javascript Rule .