<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVVideoComposition/isValid(for:assetDuration:timeRange:validationDelegate:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVVideoComposition(im)isValidForTracks:assetDuration:timeRange:validationDelegate:"
  },
  "title" : "isValid(for:assetDuration:timeRange:validationDelegate:)"
}
-->

# isValid(for:assetDuration:timeRange:validationDelegate:)

Indicates whether the time ranges of the composition’s instructions conform to validation requirements.

```
func isValid(for tracks: [AVAssetTrack], assetDuration duration: CMTime, timeRange: CMTimeRange, validationDelegate: (any AVVideoCompositionValidationHandling)?) -> Bool
```

## Parameters

`tracks`

Pass a reference to an asset’s tracks if you wish to validate the track IDs of the layer instructions against the asset’s tracks. Pass `nil` to skip that validation. This method throws an exception if the tracks aren’t all from the same asset.

`duration`

Pass the asset duration to validate the time ranges of the instructions. Pass <doc://com.apple.documentation/documentation/CoreMedia/CMTime/invalid> to skip that validation.

`timeRange`

The composition only validates those instructions with time ranges that overlap with the specified time range. To validate all instructions that the composition may use for playback or other processing, regardless of time range, pass `CMTimeRange(start: .zero, end: .positiveInfinity)`.

`validationDelegate`

A delegate that handles validation requests. May be `nil`.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the validation succeeds; otherwise; <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

---

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)