code: func ValidateNamespace(namespace *api.Namespace) field.ErrorList {
  	allErrs := ValidateObjectMeta(&namespace.ObjectMeta, false, ValidateNamespaceName, field.NewPath("metadata"))
  	for i := range namespace.Spec.Finalizers {
  		allErrs = append(allErrs, validateFinalizerName(string(namespace.Spec.Finalizers[i]), field.NewPath("spec", "finalizers"))...)
  	}
  	return allErrs
  }
docs: // ValidateNamespace tests if required fields are set.