> **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.

# Hash.validate

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

Checks if a string is a valid hash value.

## Imports

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

## Examples

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

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

Hash.validate(
  '0x3ea2f1d0abf3fc66cf29eebb70cbd4e7fe762ef8a09bcc06c8edf641230afec0'
)
// @log: true
```

## Definition

```ts
function validate(
  value: string,
): value is Hex.Hex
```

## Parameters

### value

* **Type:** `string`

Value to check.

## Return Type

Whether the value is a valid hash.

`value is Hex.Hex`
