# validateLocation

> **validateLocation**(`location`): `void`

Defined in: [packages/synapse-core/src/sp-registry/validation.ts:70](https://github.com/FilOzone/synapse-sdk/blob/8736322ef69c7a6b0f16402937c72a79b17d03e8/packages/synapse-core/src/sp-registry/validation.ts#L70)

Defensive check for the `location` capability value byte length.

The on-chain `MAX_LOCATION_LENGTH = 128` constant is declared but not
individually enforced — the stricter `MAX_CAPABILITY_VALUE_LENGTH = 128`
covers it transitively. Kept here to surface a clear error before the
value is hex-encoded into a capability entry.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `location` | `string` |

## Returns

`void`

## Throws

Errors [ValidationError](/reference/filoz/synapse-core/errors/classes/validationerror/) when `location` exceeds `SERVICE_PROVIDER_REGISTRY.MAX_LOCATION_LENGTH`