# Bytes.validate

Checks if the given value is [`Bytes.Bytes`](/api/Bytes/types#bytes).

## Imports

:::code-group
```ts [Named]
import { Bytes } from 'ox'
```

```ts [Entrypoint]
import * as Bytes from 'ox/Bytes'
```
:::

## Examples

```ts twoslash
import { Bytes } from 'ox'

Bytes.validate('0x')
// @log: false

Bytes.validate(Bytes.from([1, 2, 3]))
// @log: true
```

## Definition

```ts
function validate(
  value: unknown,
): value is Bytes
```

**Source:** [src/core/Bytes.ts](https://github.com/wevm/ox/blob/main/src/core/Bytes.ts#L890)

## Parameters

### value

* **Type:** `unknown`

Value to check.

## Return Type

`true` if the value is [`Bytes.Bytes`](/api/Bytes/types#bytes), otherwise `false`.

`value is Bytes`
