public function setRule($ruleName, $callable)
    {
        if(!is_callable($callable)) {
            throw new InvalidRuleException(InvalidRuleException::formatMessage($ruleName));
        }
        $this->rules[$ruleName] = $callable;
    }
public function setRule($ruleName, $callable)
    {
        if(!is_callable($callable)) {
            throw new InvalidRuleException(InvalidRuleException::formatMessage($ruleName));
        }
        $this->rules[$ruleName] = $callable;
    }
public function setRule ( $ ruleName , $ callable ) { if ( ! is_callable ( $ callable ) ) { throw new InvalidRuleException ( InvalidRuleException :: formatMessage ( $ ruleName ) ) ; } $ this -> rules [ $ ruleName ] = $ callable ; }
Set the rule by it's name.

@param $ruleName
@param $callable

@return void
Set the rule by it s name .