protected function registerError($rule, $key, $message = null)
    {
        if (empty($message)) {
            $message = $this->messages[$rule];
        }

        $this->errors[$key] = sprintf($message, $this->fields[$key]);
    }
protected function registerError($rule, $key, $message = null)
    {
        if (empty($message)) {
            $message = $this->messages[$rule];
        }

        $this->errors[$key] = sprintf($message, $this->fields[$key]);
    }
protected function registerError ( $ rule , $ key , $ message = null ) { if ( empty ( $ message ) ) { $ message = $ this -> messages [ $ rule ] ; } $ this -> errors [ $ key ] = sprintf ( $ message , $ this -> fields [ $ key ] ) ; }
Register error.

@param string $rule
@param string $key
@param string $message
Register error .