> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# Bytes.validate

:::info
`Bytes.validate` is a re-export of ox's [`Bytes.validate`](https://oxlib.sh/api/Bytes/validate). Refer to the ox documentation for the full reference.
:::

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

## Imports

```ts
import { Bytes } from 'viem/utils'
```

## Examples

```ts twoslash
// @noErrors
import { Bytes } from 'viem/utils'

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

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

## Definition

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

## Parameters

### value

* **Type:** `unknown`

Value to check.

## Return Type

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

`value is Bytes`
