func (in *StressChaosSpec) Validate(root interface{}, path *field.Path) field.ErrorList {
	if len(in.StressngStressors) == 0 && in.Stressors == nil {
		return field.ErrorList{
			field.Invalid(path, in, "missing stressors"),
		}
	}
	return nil
}
Validate validates the scheduler and duration
package v1alpha1
import (
	"errors"
	"fmt"
	"reflect"
	"strconv"
	"github.com/docker/go-units"
	"k8s.io/apimachinery/pkg/util/validation/field"
	"github.com/chaos-mesh/chaos-mesh/api/v1alpha1/genericwebhook"
)