# validateAccountId

[**utils**](https://limechain.gitbook.io/limechain-test/utils) • **Docs**

***

[near-sdk-js v2.0.0](https://limechain.gitbook.io/limechain-test/packages) / [utils](https://limechain.gitbook.io/limechain-test/utils) / validateAccountId

## Function: validateAccountId()

> **validateAccountId**(`accountId`): `boolean`

Validates the Account ID according to the NEAR protocol [Account ID rules](https://nomicon.io/DataStructures/Account#account-id-rules).

### Parameters

• **accountId**: `string`

The Account ID string you want to validate.

### Returns

`boolean`

### Defined in

[packages/near-sdk-js/src/utils.ts:287](https://github.com/dim-daskalov/near-sdk-js/blob/c95f5e9eab115df82feb9d8dca403e7b9c8c9534/packages/near-sdk-js/src/utils.ts#L287)
