# Function: validateDependency

▸ **validateDependency**(`dependency`, `ctx`): `void`

A function to validate dependencies in a [CreateDependencies](../../devkit/documents/CreateDependencies) function

#### Parameters

| Name         | Type                                                                            |
| :----------- | :------------------------------------------------------------------------------ |
| `dependency` | [`RawProjectGraphDependency`](../../devkit/documents/RawProjectGraphDependency) |
| `ctx`        | [`CreateDependenciesContext`](../../devkit/documents/CreateDependenciesContext) |

#### Returns

`void`

**`Throws`**

If the dependency is invalid.
