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

# TxEnvelopeLegacy.validate

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

Validates a [`TxEnvelopeLegacy.TxEnvelopeLegacy`](/docs/utilities/txenvelopelegacy/types#txenvelopelegacy). Returns `true` if the envelope is valid, `false` otherwise.

## Imports

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

## Examples

```ts twoslash
// @noErrors
import { TxEnvelopeLegacy, Value } from 'viem/utils'

const valid = TxEnvelopeLegacy.assert({
  gasPrice: 2n ** 256n - 1n + 1n,
  chainId: 1,
  to: '0x0000000000000000000000000000000000000000',
  value: Value.fromEther('1')
})
// @log: false
```

## Definition

```ts
function validate(
  envelope: PartialBy<TxEnvelopeLegacy, 'type'>,
): boolean
```

## Parameters

### envelope

* **Type:** `PartialBy<TxEnvelopeLegacy, 'type'>`

The transaction envelope to validate.

## Return Type

`boolean`
