code: func ValidateDiscoveryBootstrapToken(b *kubeadm.BootstrapTokenDiscovery, fldPath *field.Path) field.ErrorList {
  	allErrs := field.ErrorList{}
  
  	if len(b.APIServerEndpoint) == 0 {
  		allErrs = append(allErrs, field.Required(fldPath, "APIServerEndpoint is not set"))
  	}
  
  	if len(b.CACertHashes) == 0 && !b.UnsafeSkipCAVerification {
  		allErrs = append(allErrs, field.Invalid(fldPath, "", "using token-based discovery without caCertHashes can be unsafe. Set unsafeSkipCAVerification to continue"))
  	}
  
  	allErrs = append(allErrs, ValidateToken(b.Token, fldPath.Child(kubeadmcmdoptions.TokenStr))...)
  	allErrs = append(allErrs, ValidateDiscoveryTokenAPIServer(b.APIServerEndpoint, fldPath.Child("apiServerEndpoint"))...)
  
  	return allErrs
  }
docs: // ValidateDiscoveryBootstrapToken validates bootstrap token discovery configuration