code: func ValidateCustomResourceColumnDefinition(col *apiextensions.CustomResourceColumnDefinition, fldPath *field.Path) field.ErrorList {
  	allErrs := field.ErrorList{}
  
  	if len(col.Name) == 0 {
  		allErrs = append(allErrs, field.Required(fldPath.Child("name"), ""))
  	}
  
  	if len(col.Type) == 0 {
  		allErrs = append(allErrs, field.Required(fldPath.Child("type"), fmt.Sprintf("must be one of %s", strings.Join(printerColumnDatatypes.List(), ","))))
  	} else if !printerColumnDatatypes.Has(col.Type) {
  		allErrs = append(allErrs, field.Invalid(fldPath.Child("type"), col.Type, fmt.Sprintf("must be one of %s", strings.Join(printerColumnDatatypes.List(), ","))))
  	}
  
  	if len(col.Format) > 0 && !customResourceColumnDefinitionFormats.Has(col.Format) {
  		allErrs = append(allErrs, field.Invalid(fldPath.Child("format"), col.Format, fmt.Sprintf("must be one of %s", strings.Join(customResourceColumnDefinitionFormats.List(), ","))))
  	}
  
  	if len(col.JSONPath) == 0 {
  		allErrs = append(allErrs, field.Required(fldPath.Child("JSONPath"), ""))
  	} else if errs := validateSimpleJSONPath(col.JSONPath, fldPath.Child("JSONPath")); len(errs) > 0 {
  		allErrs = append(allErrs, errs...)
  	}
  
  	return allErrs
  }
docs: // ValidateCustomResourceColumnDefinition statically validates a printer column.