public function getErrorsByKey($key)
    {
        if (!is_string($key)) {
            throw new \Exception('Key must be a string');
        }
        
        $errors = array_filter($this->errors, function ($el) use ($key) {
            return $el['key'] === $key;
        });
        
        return $errors;
    }