[@rxap/form-system](../wiki/globals) / IsSelectableValueDirective

# Class: IsSelectableValueDirective

Defined in: [packages/angular/form-system/src/lib/validators/is-selectable-value.directive.ts:25](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/validators/is-selectable-value.directive.ts#L25)

## Extends

- [`ExtractOptionsDataSourceMixin`](../wiki/Class.ExtractOptionsDataSourceMixin)

## Implements

- `Validator`

## Constructors

### new IsSelectableValueDirective()

> **new IsSelectableValueDirective**(`dataSourceLoader`, `injector`): [`IsSelectableValueDirective`](../wiki/Class.IsSelectableValueDirective)

Defined in: [packages/angular/form-system/src/lib/validators/is-selectable-value.directive.ts:45](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/validators/is-selectable-value.directive.ts#L45)

#### Parameters

##### dataSourceLoader

`DataSourceLoader`

##### injector

`Injector`

#### Returns

[`IsSelectableValueDirective`](../wiki/Class.IsSelectableValueDirective)

#### Inherited from

[`ExtractOptionsDataSourceMixin`](../wiki/Class.ExtractOptionsDataSourceMixin).[`constructor`](../wiki/Class.ExtractOptionsDataSourceMixin#constructors)

## Properties

### control?

> `protected` `optional` **control**: `RxapFormControl`\<`any`, `any`, `any`\>

Defined in: [packages/angular/form-system/src/lib/mixins/extract-control.mixin.ts:14](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/mixins/extract-control.mixin.ts#L14)

#### Inherited from

[`ExtractOptionsDataSourceMixin`](../wiki/Class.ExtractOptionsDataSourceMixin).[`control`](../wiki/Class.ExtractOptionsDataSourceMixin#control)

***

### dataSource?

> `protected` `optional` **dataSource**: `BaseDataSource`\<`ControlOptions` \| `Record`\<`string`, `any`\>, `BaseDataSourceMetadata`, `BaseDataSourceViewer`\<`any`\>\>

Defined in: [packages/angular/form-system/src/lib/mixins/extract-options-data-source.mixin.ts:70](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/mixins/extract-options-data-source.mixin.ts#L70)

#### Inherited from

[`ExtractOptionsDataSourceMixin`](../wiki/Class.ExtractOptionsDataSourceMixin).[`dataSource`](../wiki/Class.ExtractOptionsDataSourceMixin#datasource)

***

### dataSourceLoader

> `protected` `readonly` **dataSourceLoader**: `DataSourceLoader`

Defined in: [packages/angular/form-system/src/lib/validators/is-selectable-value.directive.ts:47](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/validators/is-selectable-value.directive.ts#L47)

#### Inherited from

[`ExtractOptionsDataSourceMixin`](../wiki/Class.ExtractOptionsDataSourceMixin).[`dataSourceLoader`](../wiki/Class.ExtractOptionsDataSourceMixin#datasourceloader)

***

### injector

> `protected` `readonly` **injector**: `Injector`

Defined in: [packages/angular/form-system/src/lib/validators/is-selectable-value.directive.ts:49](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/validators/is-selectable-value.directive.ts#L49)

#### Inherited from

[`ExtractOptionsDataSourceMixin`](../wiki/Class.ExtractOptionsDataSourceMixin).[`injector`](../wiki/Class.ExtractOptionsDataSourceMixin#injector)

***

### matFormField?

> `protected` `optional` **matFormField**: `null` \| `MatFormField`

Defined in: [packages/angular/form-system/src/lib/mixins/extract-control.mixin.ts:12](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/mixins/extract-control.mixin.ts#L12)

#### Inherited from

[`ExtractOptionsDataSourceMixin`](../wiki/Class.ExtractOptionsDataSourceMixin).[`matFormField`](../wiki/Class.ExtractOptionsDataSourceMixin#matformfield)

***

### metadata?

> `protected` `optional` **metadata**: `BaseDataSourceMetadata`

Defined in: [packages/angular/form-system/src/lib/mixins/extract-options-data-source.mixin.ts:66](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/mixins/extract-options-data-source.mixin.ts#L66)

#### Inherited from

[`ExtractOptionsDataSourceMixin`](../wiki/Class.ExtractOptionsDataSourceMixin).[`metadata`](../wiki/Class.ExtractOptionsDataSourceMixin#metadata)

***

### ngControl

> `protected` **ngControl**: `null` \| `NgControl` \| `AbstractControlDirective`

Defined in: [packages/angular/form-system/src/lib/mixins/extract-control.mixin.ts:10](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/mixins/extract-control.mixin.ts#L10)

#### Inherited from

[`ExtractOptionsDataSourceMixin`](../wiki/Class.ExtractOptionsDataSourceMixin).[`ngControl`](../wiki/Class.ExtractOptionsDataSourceMixin#ngcontrol)

***

### settings?

> `protected` `optional` **settings**: [`UseOptionsDataSourceSettings`](../wiki/TypeAlias.UseOptionsDataSourceSettings)\<`any`\>

Defined in: [packages/angular/form-system/src/lib/mixins/extract-options-data-source.mixin.ts:62](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/mixins/extract-options-data-source.mixin.ts#L62)

#### Inherited from

[`ExtractOptionsDataSourceMixin`](../wiki/Class.ExtractOptionsDataSourceMixin).[`settings`](../wiki/Class.ExtractOptionsDataSourceMixin#settings)

***

### useDataSourceValue?

> `protected` `optional` **useDataSourceValue**: [`UseDataSourceValue`](../wiki/Interface.UseDataSourceValue)\<`ControlOptions` \| `Record`\<`string`, `any`\>, `ControlOptions` \| `Record`\<`string`, `any`\>\>

Defined in: [packages/angular/form-system/src/lib/mixins/extract-options-data-source.mixin.ts:74](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/mixins/extract-options-data-source.mixin.ts#L74)

#### Inherited from

[`ExtractOptionsDataSourceMixin`](../wiki/Class.ExtractOptionsDataSourceMixin).[`useDataSourceValue`](../wiki/Class.ExtractOptionsDataSourceMixin#usedatasourcevalue)

***

### viewer

> **viewer**: `BaseDataSourceViewer`

Defined in: [packages/angular/form-system/src/lib/validators/is-selectable-value.directive.ts:43](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/validators/is-selectable-value.directive.ts#L43)

#### Inherited from

[`ExtractOptionsDataSourceMixin`](../wiki/Class.ExtractOptionsDataSourceMixin).[`viewer`](../wiki/Class.ExtractOptionsDataSourceMixin#viewer)

## Methods

### extractControl()

> `protected` **extractControl**(`ngControl`): `RxapFormControl`

Defined in: [packages/angular/form-system/src/lib/mixins/extract-control.mixin.ts:16](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/mixins/extract-control.mixin.ts#L16)

#### Parameters

##### ngControl

`null` | `NgControl` | `AbstractControlDirective`

#### Returns

`RxapFormControl`

#### Inherited from

[`ExtractOptionsDataSourceMixin`](../wiki/Class.ExtractOptionsDataSourceMixin).[`extractControl`](../wiki/Class.ExtractOptionsDataSourceMixin#extractcontrol)

***

### extractDataSources()

> `protected` **extractDataSources**(`formDefinition`, `controlId`): `Map`\<`string`, [`UseDataSourceValue`](../wiki/Interface.UseDataSourceValue)\<`any`, `any`\>\>

Defined in: [packages/angular/form-system/src/lib/mixins/extract-data-sources.mixin.ts:9](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/mixins/extract-data-sources.mixin.ts#L9)

#### Parameters

##### formDefinition

`FormDefinition`

##### controlId

`string`

#### Returns

`Map`\<`string`, [`UseDataSourceValue`](../wiki/Interface.UseDataSourceValue)\<`any`, `any`\>\>

#### Inherited from

[`ExtractOptionsDataSourceMixin`](../wiki/Class.ExtractOptionsDataSourceMixin).[`extractDataSources`](../wiki/Class.ExtractOptionsDataSourceMixin#extractdatasources)

***

### extractFormDefinition()

> `protected` **extractFormDefinition**(`control`): `FormDefinition`

Defined in: [packages/angular/form-system/src/lib/mixins/extract-form-definition.mixin.ts:10](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/mixins/extract-form-definition.mixin.ts#L10)

#### Parameters

##### control

`AbstractControl`

#### Returns

`FormDefinition`

#### Inherited from

[`ExtractOptionsDataSourceMixin`](../wiki/Class.ExtractOptionsDataSourceMixin).[`extractFormDefinition`](../wiki/Class.ExtractOptionsDataSourceMixin#extractformdefinition)

***

### extractOptionsDatasource()

> `protected` **extractOptionsDatasource**(`control`?): `BaseDataSource`\<`ControlOptions` \| `Record`\<`string`, `any`\>\>

Defined in: [packages/angular/form-system/src/lib/mixins/extract-options-data-source.mixin.ts:76](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/mixins/extract-options-data-source.mixin.ts#L76)

#### Parameters

##### control?

`AbstractControl`\<`any`, `any`\>

#### Returns

`BaseDataSource`\<`ControlOptions` \| `Record`\<`string`, `any`\>\>

#### Inherited from

[`ExtractOptionsDataSourceMixin`](../wiki/Class.ExtractOptionsDataSourceMixin).[`extractOptionsDatasource`](../wiki/Class.ExtractOptionsDataSourceMixin#extractoptionsdatasource)

***

### validate()

> **validate**(`control`): `null` \| `ValidationErrors`

Defined in: [packages/angular/form-system/src/lib/validators/is-selectable-value.directive.ts:53](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/validators/is-selectable-value.directive.ts#L53)

#### Parameters

##### control

`AbstractControl`

The control to validate against.

#### Returns

`null` \| `ValidationErrors`

A map of validation errors if validation fails,
otherwise null.

#### Description

Method that performs synchronous validation against the provided control.
