public function setDefaultMessage(string $rule, string $message): self
    {
        $this->defaultMessages[$rule] = $message;

        return $this;
    }
public function setDefaultMessage(string $rule, string $message): self
    {
        $this->defaultMessages[$rule] = $message;

        return $this;
    }
public function setDefaultMessage ( string $ rule , string $ message ) : self { $ this -> defaultMessages [ $ rule ] = $ message ; return $ this ; }
Sets the default error message for a validation rule.

@param string $rule
@param string $message

@return self
Sets the default error message for a validation rule .