# validateCapabilities

> **validateCapabilities**(`keys`, `values`): `void`

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

Validate capability keys/values arrays against the contract's
`_validateCapabilities` require chain.

Checks:
- `keys.length === values.length`
- `keys.length <= MAX_CAPABILITIES` (24)
- each key non-empty and `<= MAX_CAPABILITY_KEY_LENGTH` (32 UTF-8 bytes)
- each value non-empty and `<= MAX_CAPABILITY_VALUE_LENGTH` (128 bytes)

## Parameters

| Parameter | Type |
| ------ | ------ |
| `keys` | readonly `string`[] |
| `values` | readonly `` `0x${string}` ``[] |

## Returns

`void`

## Throws

Errors [ValidationError](/reference/filoz/synapse-core/errors/classes/validationerror/) when any of the above is violated