You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: validation.go
    path of file: ./repos/grafana/pkg/plugins/manager/pipeline/validation
    
    the code of the file until where you have to start completion: package validation

import (
	"context"

	"github.com/grafana/grafana/pkg/plugins"
	"github.com/grafana/grafana/pkg/plugins/config"
	"github.com/grafana/grafana/pkg/plugins/log"
)

// Validator is responsible for the Validation stage of the plugin loader pipeline.
type Validator interface {
	Validate(ctx context.Context, ps []*plugins.Plugin) ([
    
func (v *Validate) Validate(ctx context.Context, ps []*plugins.Plugin) ([]*plugins.Plugin, error) {
	if len(v.validateSteps) == 0 {
		return ps, nil
	}

	validatedPlugins := make([]*plugins.Plugin, 0, len(ps))
	for _, p := range ps {
		stepFailed := false
		for _, validate := range v.validateSteps {
			err := validate(ctx, p)
			if err != nil {
				stepFailed = true
				v.log.Error("Plugin validation failed", "pluginId", p.ID, "error", err)
				break
			}
		}
		if !stepFailed {
			validatedPlugins = append(validatedPlugins, p)
		}
	}

	return validatedPlugins, nil
}