code: func (rsStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList {
  	rs := obj.(*apps.ReplicaSet)
  	allErrs := validation.ValidateReplicaSet(rs)
  	allErrs = append(allErrs, corevalidation.ValidateConditionalPodTemplate(&rs.Spec.Template, nil, field.NewPath("spec.template"))...)
  	return allErrs
  }
docs: // Validate validates a new ReplicaSet.