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

# TypedData.validate

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

Checks if [EIP-712 Typed Data](https://eips.ethereum.org/EIPS/eip-712) is valid.

## Imports

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

## Examples

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

const valid = TypedData.validate({
  domain: {
    name: 'Ether!',
    version: '1',
    chainId: 1,
    verifyingContract:
      '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC'
  },
  primaryType: 'Foo',
  types: {
    Foo: [
      { name: 'address', type: 'address' },
      { name: 'name', type: 'string' },
      { name: 'foo', type: 'string' }
    ]
  },
  message: {
    address: '0xb9CAB4F0E46F7F6b1024b5A7463734fa68E633f9',
    name: 'jxom',
    foo: '0xb9CAB4F0E46F7F6b1024b5A7463734fa68E633f9'
  }
})
// @log: true
```

## Definition

```ts
function validate<typedData, primaryType>(
  value: assert.Value<typedData, primaryType>,
): boolean
```

## Parameters

### value

* **Type:** `assert.Value<typedData, primaryType>`

The Typed Data to validate.

## Return Type

`boolean`
