code: func ValidateKey(key string) error {
  	if len(key) <= keyMaxLength && keyRegex.MatchString(key) {
  		return nil
  	}
  	return fmt.Errorf("invalid key: %q", key)
  }
docs: // ValidateKey returns an error if the given key does not meet the requirement
  // of the key format and length.