code: func (jobStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList {
  	job := obj.(*batch.Job)
  	// TODO: move UID generation earlier and do this in defaulting logic?
  	if job.Spec.ManualSelector == nil || *job.Spec.ManualSelector == false {
  		generateSelector(job)
  	}
  	allErrs := validation.ValidateJob(job)
  	allErrs = append(allErrs, corevalidation.ValidateConditionalPodTemplate(&job.Spec.Template, nil, field.NewPath("spec.template"))...)
  	return allErrs
  }
docs: // Validate validates a new job.