Sirius\Validation\Validator::clearMessages PHP 메소드

clearMessages() 공개 메소드

Clears the messages of an item
public clearMessages ( string $item = null ) : self
$item string
리턴 self
    public function clearMessages($item = null)
    {
        if (is_string($item)) {
            if (array_key_exists($item, $this->messages)) {
                unset($this->messages[$item]);
            }
        } elseif ($item === null) {
            $this->messages = array();
        }
        return $this;
    }