---
title: validate()
framework: realitykit
role: symbol
role_heading: Instance Method
platforms: [iOS 27.0+, iPadOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: realitykit/shadergraph/validate()
---

# validate()

Checks whether the graph is well-formed without producing a Metal library.

## Declaration

```swift
final func validate() -> Bool
```

## Return Value

Return Value true if the graph passes front-end validation, false otherwise.

## Discussion

Discussion Runs the ShaderGraph compiler front end — parsing, graph construction, and the transform pipeline — but stops short of stitching the graph into a Metal library. Use this to catch structural problems before paying the cost of a full compile. Validation is cheaper than ShaderGraphMaterial compilation, but the exact amount of work skipped is not guaranteed and may change over time. A graph that passes validate() may still fail later during Metal library generation.
