code: func ValidatePriorityClass(pc *scheduling.PriorityClass) field.ErrorList {
  	allErrs := field.ErrorList{}
  	allErrs = append(allErrs, apivalidation.ValidateObjectMeta(&pc.ObjectMeta, false, apimachineryvalidation.NameIsDNSSubdomain, field.NewPath("metadata"))...)
  	// If the priorityClass starts with a system prefix, it must be one of the
  	// predefined system priority classes.
  	if strings.HasPrefix(pc.Name, scheduling.SystemPriorityClassPrefix) {
  		if is, err := scheduling.IsKnownSystemPriorityClass(pc); !is {
  			allErrs = append(allErrs, field.Forbidden(field.NewPath("metadata", "name"), "priority class names with '"+scheduling.SystemPriorityClassPrefix+"' prefix are reserved for system use only. error: "+err.Error()))
  		}
  	} else if pc.Value > scheduling.HighestUserDefinablePriority {
  		// Non-system critical priority classes are not allowed to have a value larger than HighestUserDefinablePriority.
  		allErrs = append(allErrs, field.Forbidden(field.NewPath("value"), fmt.Sprintf("maximum allowed value of a user defined priority is %v", scheduling.HighestUserDefinablePriority)))
  	}
  	return allErrs
  }
docs: // ValidatePriorityClass tests whether required fields in the PriorityClass are
  // set correctly.