private function validateByRule( $field, $value, $rule, $message = null )
    {
        $ruleClassName = $this->ruleToClassName($this->getRuleName($rule));

        if (!class_exists($ruleClassName)) {
            return false;
        }

        $ruleObject = new $ruleClassName();
        if ($this->isLengthRule($rule)) {
            $ruleObject->setLength($this->extractLength($rule));;
        } else {
            if ($this->isSameRule($rule)) {
                $ruleObject->prepareRule($this->fields, $this->extractSame($rule));
            }
        }
        $result = $ruleObject->run($this->keyToLabel($field), $value, $message);

        if (!$result) {
            static::$errors[ $field ] = $ruleObject->message();
        }

        return $result;
    }