<!--
{
  "availability" : [
    "macOS: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Virtualization",
  "identifier" : "/documentation/Virtualization/VZNetworkBlockDeviceStorageDeviceAttachment/validate(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Virtualization"
    ],
    "preciseIdentifier" : "c:objc(cs)VZNetworkBlockDeviceStorageDeviceAttachment(cm)validateURL:error:"
  },
  "title" : "validate(_:)"
}
-->

# validate(_:)

Checks if the URL is a valid network block device URL.

```
class func validate(_ URL: URL) throws
```

## Parameters

`URL`

The NBD URL to validate.

## Discussion

This method checks that the URL is well-formed; however, it doesn’t attempt to access the URL. See the [NBD URL specification](https://github.com/NetworkBlockDevice/nbd/blob/master/doc/uri.md) on GitHub for more detailed descriptions of valid URIs.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)