Sirius\Validation\Validator::clearMessages PHP Method

clearMessages() public method

Clears the messages of an item
public clearMessages ( string $item = null ) : self
$item string
return 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;
    }