# Hash.validate

Checks if a string is a valid hash value.

## Imports

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

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

## Examples

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

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

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

## Definition

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

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

## Parameters

### value

* **Type:** `string`

Value to check.

## Return Type

Whether the value is a valid hash.

`value is Hex.Hex`
