> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class: VIdentity<Type, Kind, IsOptional>

> A native source or request identity validator.

[values](/api/modules/values).VIdentity

A native source or request identity validator.

## Type parameters

| Name | Type |
| :- | :- |
| `Type` | `Type` |
| `Kind` | extends `"sourceId"` \| `"requestId"` |
| `IsOptional` | extends [`OptionalProperty`](/api/modules/values#optionalproperty) = `"required"` |

## Hierarchy

* `BaseValidator`\<`Type`, `IsOptional`>

  ↳ **`VIdentity`**

## Constructors

### constructor

• **new VIdentity**\<`Type`, `Kind`, `IsOptional`>(`options`)

#### Type parameters

| Name | Type |
| :- | :- |
| `Type` | `Type` |
| `Kind` | extends `"sourceId"` \| `"requestId"` |
| `IsOptional` | extends [`OptionalProperty`](/api/modules/values#optionalproperty) = `"required"` |

#### Parameters

| Name | Type |
| :- | :- |
| `options` | `Object` |
| `options.kind` | `Kind` |
| `options.isOptional` | `IsOptional` |

#### Overrides

BaseValidator\&lt;Type, IsOptional\&gt;.constructor

## Properties

### type

• `Readonly` **type**: `Type`

Only for TypeScript, the TS type of the JS values validated
by this validator.

#### Inherited from

BaseValidator.type

***

### fieldPaths

• `Readonly` **fieldPaths**: `never`

Only for TypeScript, if this an Object validator, then
this is the TS type of its property names.

#### Inherited from

BaseValidator.fieldPaths

***

### isOptional

• `Readonly` **isOptional**: `IsOptional`

Whether this is an optional Object property value validator.

#### Inherited from

BaseValidator.isOptional

***

### isConvexValidator

• `Readonly` **isConvexValidator**: `true`

Always `"true"`.

#### Inherited from

BaseValidator.isConvexValidator

***

### kind

• `Readonly` **kind**: `Kind`

## Accessors

### json

• `get` **json**(): [`ValidatorJSON`](/api/modules/values#validatorjson)

#### Returns

[`ValidatorJSON`](/api/modules/values#validatorjson)

#### Overrides

BaseValidator.json

## Methods

### optional

▸ **optional**(): [`VIdentity`](/api/classes/values.VIdentity)\<`Type` | `undefined`, `Kind`, `"optional"`>

#### Returns

[`VIdentity`](/api/classes/values.VIdentity)\<`Type` | `undefined`, `Kind`, `"optional"`>

#### Overrides

BaseValidator.optional

***

### asOptional

▸ **asOptional**(): [`VIdentity`](/api/classes/values.VIdentity)\<`undefined` | `Type`, `Kind`, `"optional"`>

#### Returns

[`VIdentity`](/api/classes/values.VIdentity)\<`undefined` | `Type`, `Kind`, `"optional"`>

#### Overrides

BaseValidator.asOptional


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.