code: func ValidateSecretUpdate(newSecret, oldSecret *core.Secret) field.ErrorList {
  	allErrs := ValidateObjectMetaUpdate(&newSecret.ObjectMeta, &oldSecret.ObjectMeta, field.NewPath("metadata"))
  
  	if len(newSecret.Type) == 0 {
  		newSecret.Type = oldSecret.Type
  	}
  
  	allErrs = append(allErrs, ValidateImmutableField(newSecret.Type, oldSecret.Type, field.NewPath("type"))...)
  
  	allErrs = append(allErrs, ValidateSecret(newSecret)...)
  	return allErrs
  }
docs: // ValidateSecretUpdate tests if required fields in the Secret are set.