# Class RxapFormArray<T, E, Parent>

#### Type Parameters

- T = any
- E extends object = any
- Parent extends object = any

#### Hierarchy

- UntypedFormArray
  - RxapFormArray

#### Implements

- AbstractControl<T[]>

- Defined in packages/angular/forms/src/lib/form-array.ts:55

#####
Index

### Constructors

constructor

### Properties

_builder
_controlInsertedFn
_controlRemovedFn
_readonly
controlId
controls
dirty$
dirtyChanges
disabled$
enabled$
errors
errors$
events
pristine
status
status$
statusChanges
touch$
touchChanges
touched
value
value$
valueChanges

### Accessors

asyncValidator
controlPath
dirty
disabled
enabled
fullControlPath
invalid
length
parent
pending
readonly
root
rxapFormDefinition
untouched
updateOn
valid
validator

### Methods

_patchValue
addAsyncValidators
addValidators
at
clear
clearAsyncValidators
clearValidators
disable
disabledWhile
enable
enabledWhile
get
getError
getRawValue
hasAsyncValidator
hasError
hasErrorAndDirty
hasErrorAndTouched
hasValidator
insert
insertAt
markAllAsDirty
markAllAsPristine
markAllAsTouched
markAllAsUntouched
markAsDirty
markAsPending
markAsPristine
markAsTouched
markAsUntouched
mergeAsyncValidators
mergeValidators
patchValue
push
removeAsyncValidators
removeAt
removeValidators
reset
select
setAsyncValidators
setControl
setDisable
setEnable
setErrors
setParent
setValidators
setValue
updateValueAndValidity
validateOn

## Constructors

### constructor

- new RxapFormArray<T, E, Parent>(controls, options): RxapFormArray<T, E, Parent>

- #### Type Parameters

  - T = any
  - E extends object = any
  - Parent extends object = any

  #### Parameters

  - controls: AbstractControl<T>[]
  - options: FormArrayOptions

  #### Returns RxapFormArray<T, E, Parent>

  Overrides UntypedFormArray.constructor

  - Defined in packages/angular/forms/src/lib/form-array.ts:130

## Properties

### `Private` `Readonly` _builder

_builder: FormBuilderFn

- Defined in packages/angular/forms/src/lib/form-array.ts:126

### `Private` `Readonly` _controlInsertedFn

_controlInsertedFn: ControlInsertedFn

- Defined in packages/angular/forms/src/lib/form-array.ts:127

### `Private` `Readonly` _controlRemovedFn

_controlRemovedFn: ControlRemovedFn

- Defined in packages/angular/forms/src/lib/form-array.ts:128

### `Private` _readonly

_readonly: boolean = false

- Defined in packages/angular/forms/src/lib/form-array.ts:61

### `Readonly` controlId

controlId: string

Implementation of AbstractControl.controlId

- Defined in packages/angular/forms/src/lib/form-array.ts:117

### controls

controls: AbstractControl<T>[]

Inherited from UntypedFormArray.controls

- Defined in packages/angular/forms/src/lib/form-array.ts:131

### `Readonly` dirty$

dirty$: Observable<boolean> = ...

- Defined in packages/angular/forms/src/lib/form-array.ts:123

### `Private` `Readonly` dirtyChanges

dirtyChanges: Subject<boolean> = ...

- Defined in packages/angular/forms/src/lib/form-array.ts:122

### `Readonly` disabled$

disabled$: Observable<boolean> = ...

- Defined in packages/angular/forms/src/lib/form-array.ts:111

### `Readonly` enabled$

enabled$: Observable<boolean> = ...

- Defined in packages/angular/forms/src/lib/form-array.ts:113

### `Readonly` errors

errors: E

An object containing any errors generated by failing validation, or null if there are no errors.

Implementation of AbstractControl.errors

Overrides UntypedFormArray.errors

- Defined in packages/angular/forms/src/lib/form-array.ts:114

### `Readonly` errors$

errors$: Observable<E> = ...

- Defined in packages/angular/forms/src/lib/form-array.ts:116

### `Readonly` events

events: Observable<ControlEvent<any>>

A multicasting observable that emits an event every time the state of the control changes. It emits for value, status, pristine or touched changes.

Note: On value change, the emit happens right after a value of this control is updated. The value of a parent control (for example if this FormControl is a part of a FormGroup) is updated later, so accessing a value of a parent control (using the `value` property) from the callback of this event might result in getting a value that has not been updated yet. Subscribe to the `events` of the parent control instead. For other event types, the events are emitted after the parent control has been updated.

Implementation of AbstractControl.events

Inherited from UntypedFormArray.events

- Defined in node_modules/@angular/forms/index.d.ts:190

### `Readonly` pristine

pristine: boolean

A control is `pristine` if the user has not yet changed the value in the UI.

#### Returns

True if the user has not yet changed the value in the UI; compare `dirty`. Programmatic changes to a control's value do not mark it dirty.

Implementation of AbstractControl.pristine

Inherited from UntypedFormArray.pristine

- Defined in node_modules/@angular/forms/index.d.ts:155

### `Readonly` status

status: ControlState

The validation status of the control.

#### See

FormControlStatus

These status values are mutually exclusive, so a control cannot be both valid AND invalid or invalid AND disabled.

Implementation of AbstractControl.status

Overrides UntypedFormArray.status

- Defined in packages/angular/forms/src/lib/form-array.ts:110

### `Readonly` status$

status$: Observable<ControlState> = ...

- Defined in packages/angular/forms/src/lib/form-array.ts:115

### `Readonly` statusChanges

statusChanges: Observable<ControlState>

A multicasting observable that emits an event every time the validation `status` of the control recalculates.

#### See

- FormControlStatus
- AbstractControl.status

TODO: this should be piped from events() but is breaking in G3

Implementation of AbstractControl.statusChanges

Overrides UntypedFormArray.statusChanges

- Defined in packages/angular/forms/src/lib/form-array.ts:112

### `Readonly` touch$

touch$: Observable<boolean> = ...

- Defined in packages/angular/forms/src/lib/form-array.ts:119

### `Private` `Readonly` touchChanges

touchChanges: Subject<boolean> = ...

- Defined in packages/angular/forms/src/lib/form-array.ts:118

### `Readonly` touched

touched: boolean

True if the control is marked as `touched`.

A control is marked `touched` once the user has triggered a `blur` event on it.

Implementation of AbstractControl.touched

Inherited from UntypedFormArray.touched

- Defined in node_modules/@angular/forms/index.d.ts:170

### `Readonly` value

value: T[]

Implementation of AbstractControl.value

Overrides UntypedFormArray.value

- Defined in packages/angular/forms/src/lib/form-array.ts:95

### `Readonly` value$

value$: Observable<T[]> = ...

- Defined in packages/angular/forms/src/lib/form-array.ts:109

### `Readonly` valueChanges

valueChanges: Observable<T[]>

A multicasting observable that emits an event every time the value of the control changes, in the UI or programmatically. It also emits an event each time you call enable() or disable() without passing along {emitEvent: false} as a function argument.

Note: the emit happens right after a value of this control is updated. The value of a parent control (for example if this FormControl is a part of a FormGroup) is updated later, so accessing a value of a parent control (using the `value` property) from the callback of this event might result in getting a value that has not been updated yet. Subscribe to the `valueChanges` event of the parent control instead.

TODO: this should be piped from events() but is breaking in G3

Implementation of AbstractControl.valueChanges

Overrides UntypedFormArray.valueChanges

- Defined in packages/angular/forms/src/lib/form-array.ts:107

## Accessors

### asyncValidator

- get asyncValidator(): AsyncValidatorFn

- Returns the function that is used to determine the validity of this control asynchronously. If multiple validators have been added, this will be a single composed function. See `Validators.compose()` for additional information.

  #### Returns AsyncValidatorFn

  Implementation of AbstractControl.asyncValidator

  Inherited from UntypedFormArray.asyncValidator

  - Defined in node_modules/@angular/forms/index.d.ts:79
- set asyncValidator(asyncValidatorFn): void

- #### Parameters

  - asyncValidatorFn: AsyncValidatorFn

  #### Returns void

  Implementation of AbstractControl.asyncValidator

  Inherited from UntypedFormArray.asyncValidator

  - Defined in node_modules/@angular/forms/index.d.ts:80

### controlPath

- get controlPath(): string

- #### Returns string

  - Defined in packages/angular/forms/src/lib/form-array.ts:81

### dirty

- get dirty(): boolean

- A control is `dirty` if the user has changed the value in the UI.

  #### Returns boolean

  True if the user has changed the value of this control in the UI; compare `pristine`. Programmatic changes to a control's value do not mark it dirty.

  Implementation of AbstractControl.dirty

  Inherited from UntypedFormArray.dirty

  - Defined in node_modules/@angular/forms/index.d.ts:163

### disabled

- get disabled(): boolean

- A control is `disabled` when its `status` is `DISABLED`.

  Disabled controls are exempt from validation checks and are not included in the aggregate value of their ancestor controls.

  #### Returns boolean

  True if the control is disabled, false otherwise.

  #### See

  AbstractControl.status

  Implementation of AbstractControl.disabled

  Inherited from UntypedFormArray.disabled

  - Defined in node_modules/@angular/forms/index.d.ts:132

### enabled

- get enabled(): boolean

- A control is `enabled` as long as its `status` is not `DISABLED`.

  #### Returns boolean

  True if the control has any status other than 'DISABLED', false if the status is 'DISABLED'.

  #### See

  AbstractControl.status

  Implementation of AbstractControl.enabled

  Inherited from UntypedFormArray.enabled

  - Defined in node_modules/@angular/forms/index.d.ts:142

### fullControlPath

- get fullControlPath(): string

- #### Returns string

  Implementation of AbstractControl.fullControlPath

  - Defined in packages/angular/forms/src/lib/form-array.ts:97

### invalid

- get invalid(): boolean

- A control is `invalid` when its `status` is `INVALID`.

  #### Returns boolean

  True if this control has failed one or more of its validation checks, false otherwise.

  #### See

  AbstractControl.status

  Implementation of AbstractControl.invalid

  Inherited from UntypedFormArray.invalid

  - Defined in node_modules/@angular/forms/index.d.ts:111

### length

- get length(): number

- Length of the control array.

  #### Returns number

  Inherited from UntypedFormArray.length

  - Defined in node_modules/@angular/forms/index.d.ts:1655

### parent

- get parent(): FormGroup<any> | FormArray<any>

- The parent control.

  #### Returns FormGroup<any> | FormArray<any>

  Implementation of AbstractControl.parent

  Inherited from UntypedFormArray.parent

  - Defined in node_modules/@angular/forms/index.d.ts:84

### pending

- get pending(): boolean

- A control is `pending` when its `status` is `PENDING`.

  #### Returns boolean

  True if this control is in the process of conducting a validation check, false otherwise.

  #### See

  AbstractControl.status

  Implementation of AbstractControl.pending

  Inherited from UntypedFormArray.pending

  - Defined in node_modules/@angular/forms/index.d.ts:120

### readonly

- get readonly(): boolean

- #### Returns boolean

  Implementation of AbstractControl.readonly

  - Defined in packages/angular/forms/src/lib/form-array.ts:63
- set readonly(value): void

- #### Parameters

  - value: boolean

  #### Returns void

  Implementation of AbstractControl.readonly

  - Defined in packages/angular/forms/src/lib/form-array.ts:67

### root

- get root(): AbstractControl<any, any>

- Retrieves the top-level ancestor of this control.

  #### Returns AbstractControl<any, any>

  Implementation of AbstractControl.root

  Inherited from UntypedFormArray.root

  - Defined in node_modules/@angular/forms/index.d.ts:674

### rxapFormDefinition

- get rxapFormDefinition(): Partial<FormDefinition<Parent, any, any>> & {
  [K in string | number | symbol]: Parent[K] extends U[]
  ? FormDefinitionArray<FormType<U>> | FormDefinitionArray<RxapFormControl<U, any, any>> | RxapFormArray<U, any, any> | RxapFormControl<any[any], any, any>
  : Parent[K] extends Record<string, any>
  ? Partial<FormDefinition<Parent[K], any, any>> & {
  [K in string | number | symbol]: Parent[K][K] extends U[]
  ? FormDefinitionArray<FormType<(...)>> | FormDefinitionArray<RxapFormControl<(...), (...), (...)>> | RxapFormArray<U, any, any> | RxapFormControl<any[any], any, any>
  : (...)[(...)][K] extends Record<string, any>
  ? (...) & (...) & (...) | RxapFormControl<(...), (...), (...)>
  : RxapFormControl<NonEmpty<(...)>, any, any>
  } & Partial<FormDefinition<Parent[K], any, any>> | RxapFormControl<Parent[K], any, any>
  : RxapFormControl<NonEmpty<Parent[K]>, any, any>
  } & FormDefinition<Parent, any, any>
- `Internal`

  #### Returns Partial<FormDefinition<Parent, any, any>> & {
  [K in string | number | symbol]: Parent[K] extends U[]
  ? FormDefinitionArray<FormType<U>> | FormDefinitionArray<RxapFormControl<U, any, any>> | RxapFormArray<U, any, any> | RxapFormControl<any[any], any, any>
  : Parent[K] extends Record<string, any>
  ? Partial<FormDefinition<Parent[K], any, any>> & {
  [K in string | number | symbol]: Parent[K][K] extends U[]
  ? FormDefinitionArray<FormType<(...)>> | FormDefinitionArray<RxapFormControl<(...), (...), (...)>> | RxapFormArray<U, any, any> | RxapFormControl<any[any], any, any>
  : (...)[(...)][K] extends Record<string, any>
  ? (...) & (...) & (...) | RxapFormControl<(...), (...), (...)>
  : RxapFormControl<NonEmpty<(...)>, any, any>
  } & Partial<FormDefinition<Parent[K], any, any>> | RxapFormControl<Parent[K], any, any>
  : RxapFormControl<NonEmpty<Parent[K]>, any, any>
  } & FormDefinition<Parent, any, any>

  Implementation of AbstractControl.rxapFormDefinition

  - Defined in packages/angular/forms/src/lib/form-array.ts:75

### untouched

- get untouched(): boolean

- True if the control has not been marked as touched

  A control is `untouched` if the user has not yet triggered a `blur` event on it.

  #### Returns boolean

  Implementation of AbstractControl.untouched

  Inherited from UntypedFormArray.untouched

  - Defined in node_modules/@angular/forms/index.d.ts:177

### updateOn

- get updateOn(): FormHooks

- Reports the update strategy of the `AbstractControl` (meaning the event on which the control updates itself). Possible values: `'change'` | `'blur'` | `'submit'` Default value: `'change'`

  #### Returns FormHooks

  Implementation of AbstractControl.updateOn

  Inherited from UntypedFormArray.updateOn

  - Defined in node_modules/@angular/forms/index.d.ts:221

### valid

- get valid(): boolean

- A control is `valid` when its `status` is `VALID`.

  #### Returns boolean

  True if the control has passed all of its validation tests, false otherwise.

  #### See

  AbstractControl.status

  Implementation of AbstractControl.valid

  Inherited from UntypedFormArray.valid

  - Defined in node_modules/@angular/forms/index.d.ts:102

### validator

- get validator(): ValidatorFn

- Returns the function that is used to determine the validity of this control synchronously. If multiple validators have been added, this will be a single composed function. See `Validators.compose()` for additional information.

  #### Returns ValidatorFn

  Implementation of AbstractControl.validator

  Inherited from UntypedFormArray.validator

  - Defined in node_modules/@angular/forms/index.d.ts:72
- set validator(validatorFn): void

- #### Parameters

  - validatorFn: ValidatorFn

  #### Returns void

  Implementation of AbstractControl.validator

  Inherited from UntypedFormArray.validator

  - Defined in node_modules/@angular/forms/index.d.ts:73

## Methods

### `Private` _patchValue

- _patchValue(value, options?): void

- #### Parameters

  - value: T[]
  - `Optional` options: ControlEventOptions

  #### Returns void

  - Defined in packages/angular/forms/src/lib/form-array.ts:257

### addAsyncValidators

- addAsyncValidators(validators): void

- Add an asynchronous validator or validators to this control, without affecting other validators.

  When you add or remove a validator at run time, you must call `updateValueAndValidity()` for the new validation to take effect.

  Adding a validator that already exists will have no effect.

  #### Parameters

  - validators: AsyncValidatorFn | AsyncValidatorFn[]

    The new asynchronous validator function or functions to add to this control.

  #### Returns void

  Implementation of AbstractControl.addAsyncValidators

  Inherited from UntypedFormArray.addAsyncValidators

  - Defined in node_modules/@angular/forms/index.d.ts:268

### addValidators

- addValidators(validators): void

- Add a synchronous validator or validators to this control, without affecting other validators.

  When you add or remove a validator at run time, you must call `updateValueAndValidity()` for the new validation to take effect.

  Adding a validator that already exists will have no effect. If duplicate validator functions are present in the `validators` array, only the first instance would be added to a form control.

  #### Parameters

  - validators: ValidatorFn | ValidatorFn[]

    The new validator function or functions to add to this control.

  #### Returns void

  Implementation of AbstractControl.addValidators

  Inherited from UntypedFormArray.addValidators

  - Defined in node_modules/@angular/forms/index.d.ts:256

### at

- at(index): AbstractControl<T>

- #### Parameters

  - index: number

  #### Returns AbstractControl<T>

  Overrides UntypedFormArray.at

  - Defined in packages/angular/forms/src/lib/form-array.ts:145

### clear

- clear(options?): void

- Remove all controls in the `FormArray`.

  #### Parameters

  - `Optional` options: {
    emitEvent?: boolean;
    }

    Specifies whether this FormArray instance should emit events after all controls are removed.

    - `emitEvent`: When true or not supplied (the default), both the `statusChanges` and `valueChanges` observables emit events with the latest status and value when all controls in this FormArray instance are removed. When false, no events are emitted.

    - ##### `Optional` emitEvent?: boolean

  #### Returns void

  #### Usage Notes

  ### Remove all elements from a FormArray

      const arr = new FormArray([
         new FormControl(),
         new FormControl()
      ]);
      console.log(arr.length);  // 2

      arr.clear();
      console.log(arr.length);  // 0

  It's a simpler and more efficient alternative to removing all elements one by one:

      const arr = new FormArray([
         new FormControl(),
         new FormControl()
      ]);

      while (arr.length) {
         arr.removeAt(0);
      }

  Inherited from UntypedFormArray.clear

  - Defined in node_modules/@angular/forms/index.d.ts:1823

### clearAsyncValidators

- clearAsyncValidators(): void

- Empties out the async validator list.

  When you add or remove a validator at run time, you must call `updateValueAndValidity()` for the new validation to take effect.

  #### Returns void

  Implementation of AbstractControl.clearAsyncValidators

  Inherited from UntypedFormArray.clearAsyncValidators

  - Defined in node_modules/@angular/forms/index.d.ts:359

### clearValidators

- clearValidators(): void

- Empties out the synchronous validator list.

  When you add or remove a validator at run time, you must call `updateValueAndValidity()` for the new validation to take effect.

  #### Returns void

  Implementation of AbstractControl.clearValidators

  Inherited from UntypedFormArray.clearValidators

  - Defined in node_modules/@angular/forms/index.d.ts:351

### disable

- disable(opts?): void

- Disables the control. This means the control is exempt from validation checks and excluded from the aggregate value of any parent. Its status is `DISABLED`.

  If the control has children, all children are also disabled.

  #### Parameters

  - `Optional` opts: {
    emitEvent?: boolean;
    onlySelf?: boolean;
    }

    Configuration options that determine how the control propagates changes and emits events after the control is disabled.

    - `onlySelf`: When true, mark only this control. When false or not supplied, marks all direct ancestors. Default is false.
    - `emitEvent`: When true or not supplied (the default), the `statusChanges`, `valueChanges` and `events` observables emit events with the latest status and value when the control is disabled. When false, no events are emitted.

    - ##### `Optional` emitEvent?: boolean

    - ##### `Optional` onlySelf?: boolean

  #### Returns void

  #### See

  AbstractControl.status

  Implementation of AbstractControl.disable

  Inherited from UntypedFormArray.disable

  - Defined in node_modules/@angular/forms/index.d.ts:496

### disabledWhile

- disabledWhile(observable, options?): Subscription

- #### Parameters

  - observable: Observable<boolean>
  - `Optional` options: ControlOptions

  #### Returns Subscription

  - Defined in packages/angular/forms/src/lib/form-array.ts:192

### enable

- enable(opts?): void

- Enables the control. This means the control is included in validation checks and the aggregate value of its parent. Its status recalculates based on its value and its validators.

  By default, if the control has children, all children are enabled.

  #### Parameters

  - `Optional` opts: {
    emitEvent?: boolean;
    onlySelf?: boolean;
    }

    Configure options that control how the control propagates changes and emits events when marked as untouched

    - `onlySelf`: When true, mark only this control. When false or not supplied, marks all direct ancestors. Default is false.
    - `emitEvent`: When true or not supplied (the default), the `statusChanges`, `valueChanges` and `events` observables emit events with the latest status and value when the control is enabled. When false, no events are emitted.

    - ##### `Optional` emitEvent?: boolean

    - ##### `Optional` onlySelf?: boolean

  #### Returns void

  #### See

  AbstractControl.status

  Implementation of AbstractControl.enable

  Inherited from UntypedFormArray.enable

  - Defined in node_modules/@angular/forms/index.d.ts:518

### enabledWhile

- enabledWhile(observable, options?): Subscription

- #### Parameters

  - observable: Observable<boolean>
  - `Optional` options: ControlOptions

  #### Returns Subscription

  - Defined in packages/angular/forms/src/lib/form-array.ts:199

### get

- get<P>(path): AbstractControl<ɵGetProperty<any, P>, ɵGetProperty<any, P>>

- Retrieves a child control given the control's name or path.

  This signature for get supports strings and `const` arrays (`.get(['foo', 'bar'] as const)`).

  #### Type Parameters

  - P extends string | readonly (string | number)[]

  #### Parameters

  - path: P

  #### Returns AbstractControl<ɵGetProperty<any, P>, ɵGetProperty<any, P>>

  Implementation of AbstractControl.get

  Inherited from UntypedFormArray.get

  - Defined in node_modules/@angular/forms/index.d.ts:604
- get<P>(path): AbstractControl<ɵGetProperty<any, P>, ɵGetProperty<any, P>>

- Retrieves a child control given the control's name or path.

  This signature for `get` supports non-const (mutable) arrays. Inferred type information will not be as robust, so prefer to pass a `readonly` array if possible.

  #### Type Parameters

  - P extends string | (string | number)[]

  #### Parameters

  - path: P

  #### Returns AbstractControl<ɵGetProperty<any, P>, ɵGetProperty<any, P>>

  Implementation of AbstractControl.get

  Inherited from UntypedFormArray.get

  - Defined in node_modules/@angular/forms/index.d.ts:611

### getError

- getError<K>(errorCode, path?): E[K]

- #### Type Parameters

  - K extends string

  #### Parameters

  - errorCode: K

    The code of the error to check

  - `Optional` path: ControlPath

    A list of control names that designates how to move from the current control to the control that should be queried for errors.

  #### Returns E[K]

  error data for that particular error. If the control or error is not present, null is returned.

  #### Description

  Reports error data for the control with the given path.

  #### Usage Notes

  For example, for the following `FormGroup`:

      form = new FormGroup({
        address: new FormGroup({ street: new FormControl() })
      });

  The path to the 'street' control from the root form would be 'address' -> 'street'.

  It can be provided to this method in one of two formats:

  1. An array of string control names, e.g. `['address', 'street']`
  2. A period-delimited list of control names in one string, e.g. `'address.street'`

  Implementation of AbstractControl.getError

  Overrides UntypedFormArray.getError

  - Defined in packages/angular/forms/src/lib/form-array.ts:391

### getRawValue

- getRawValue(): T[]

- The raw value of this control. For most control implementations, the raw value will include disabled children.

  #### Returns T[]

  Implementation of AbstractControl.getRawValue

  Overrides UntypedFormArray.getRawValue

  - Defined in packages/angular/forms/src/lib/form-array.ts:149

### hasAsyncValidator

- hasAsyncValidator(validator): boolean

- Check whether an asynchronous validator function is present on this control. The provided validator must be a reference to the exact same function that was provided.

  #### Parameters

  - validator: AsyncValidatorFn

    The asynchronous validator to check for presence. Compared by function reference.

  #### Returns boolean

  Whether the provided asynchronous validator was found on this control.

  Implementation of AbstractControl.hasAsyncValidator

  Inherited from UntypedFormArray.hasAsyncValidator

  - Defined in node_modules/@angular/forms/index.d.ts:343

### hasError

- hasError(errorCode, path?): boolean

- #### Parameters

  - errorCode: Extract<keyof E, string>

    The code of the error to check

  - `Optional` path: ControlPath

    A list of control names that designates how to move from the current control to the control that should be queried for errors.

  #### Returns boolean

  whether the given error is present in the control at the given path.

  If the control is not present, false is returned.

  #### Description

  Reports whether the control with the given path has the error specified.

  #### Usage Notes

  For example, for the following `FormGroup`:

      form = new FormGroup({
        address: new FormGroup({ street: new FormControl() })
      });

  The path to the 'street' control from the root form would be 'address' -> 'street'.

  It can be provided to this method in one of two formats:

  1. An array of string control names, e.g. `['address', 'street']`
  2. A period-delimited list of control names in one string, e.g. `'address.street'`

  If no path is given, this method checks for the error on the current control.

  Implementation of AbstractControl.hasError

  Overrides UntypedFormArray.hasError

  - Defined in packages/angular/forms/src/lib/form-array.ts:383

### hasErrorAndDirty

- hasErrorAndDirty(errorCode, path?): boolean

- #### Parameters

  - errorCode: ExtractStrings<E>
  - `Optional` path: ControlPath

  #### Returns boolean

  - Defined in packages/angular/forms/src/lib/form-array.ts:302

### hasErrorAndTouched

- hasErrorAndTouched(errorCode, path?): boolean

- #### Parameters

  - errorCode: ExtractStrings<E>
  - `Optional` path: ControlPath

  #### Returns boolean

  - Defined in packages/angular/forms/src/lib/form-array.ts:250

### hasValidator

- hasValidator(validator): boolean

- Check whether a synchronous validator function is present on this control. The provided validator must be a reference to the exact same function that was provided.

  #### Parameters

  - validator: ValidatorFn

    The validator to check for presence. Compared by function reference.

  #### Returns boolean

  Whether the provided validator was found on this control.

  #### Usage Notes

  ### Reference to a ValidatorFn

      // Reference to the RequiredValidator
      const ctrl = new FormControl<number | null>(0, Validators.required);
      expect(ctrl.hasValidator(Validators.required)).toEqual(true)

      // Reference to anonymous function inside MinValidator
      const minValidator = Validators.min(3);
      const ctrl = new FormControl<number | null>(0, minValidator);
      expect(ctrl.hasValidator(minValidator)).toEqual(true)
      expect(ctrl.hasValidator(Validators.min(3))).toEqual(false)

  Implementation of AbstractControl.hasValidator

  Inherited from UntypedFormArray.hasValidator

  - Defined in node_modules/@angular/forms/index.d.ts:334

### insert

- insert(index, control): void

- #### Parameters

  - index: number
  - control: AbstractControl<T>

  #### Returns void

  Overrides UntypedFormArray.insert

  - Defined in packages/angular/forms/src/lib/form-array.ts:153

### insertAt

- insertAt(index?, state?, options?): void

- inserts a new control at the specified index. If the index is undefined the new control will be added to the end.

  #### Parameters

  - `Optional` index: number

    (optional) the index where the control should be created

  - `Optional` state: T

    (optional) the initial state of the new control

  - `Optional` options: ControlEventOptions

    (optional) ControlEventOptions

  #### Returns void

  - Defined in packages/angular/forms/src/lib/form-array.ts:168

### markAllAsDirty

- markAllAsDirty(): void

- #### Returns void

  - Defined in packages/angular/forms/src/lib/form-array.ts:218

### markAllAsPristine

- markAllAsPristine(): void

- #### Returns void

  - Defined in packages/angular/forms/src/lib/form-array.ts:222

### markAllAsTouched

- markAllAsTouched(opts?): void

- Marks the control and all its descendant controls as `touched`.

  #### Parameters

  - `Optional` opts: {
    emitEvent?: boolean;
    }

    Configuration options that determine how the control propagates changes and emits events after marking is applied.

    - `emitEvent`: When true or not supplied (the default), the `events` observable emits a `TouchedChangeEvent` with the `touched` property being `true`. When false, no events are emitted.

    - ##### `Optional` emitEvent?: boolean

  #### Returns void

  #### See

  ()

  Implementation of AbstractControl.markAllAsTouched

  Inherited from UntypedFormArray.markAllAsTouched

  - Defined in node_modules/@angular/forms/index.d.ts:390

### markAllAsUntouched

- markAllAsUntouched(): void

- #### Returns void

  - Defined in packages/angular/forms/src/lib/form-array.ts:240

### markAsDirty

- markAsDirty(opts?): void

- Marks the control as `dirty`. A control becomes dirty when the control's value is changed through the UI; compare `markAsTouched`.

  #### Parameters

  - `Optional` opts: OnlySelf

    Configuration options that determine how the control propagates changes and emits events after marking is applied.

    - `onlySelf`: When true, mark only this control. When false or not supplied, marks all direct ancestors. Default is false.
    - `emitEvent`: When true or not supplied (the default), the `events` observable emits a `PristineChangeEvent` with the `pristine` property being `false`. When false, no events are emitted.

  #### Returns void

  #### See

  - ()
  - ()
  - ()

  Implementation of AbstractControl.markAsDirty

  Overrides UntypedFormArray.markAsDirty

  - Defined in packages/angular/forms/src/lib/form-array.ts:354

### markAsPending

- markAsPending(opts?): void

- Marks the control as `pending`.

  A control is pending while the control performs async validation.

  #### Parameters

  - `Optional` opts: {
    emitEvent?: boolean;
    onlySelf?: boolean;
    }

    Configuration options that determine how the control propagates changes and emits events after marking is applied.

    - `onlySelf`: When true, mark only this control. When false or not supplied, marks all direct ancestors. Default is false.
    - `emitEvent`: When true or not supplied (the default), the `statusChanges` observable emits an event with the latest status the control is marked pending and the `events` observable emits a `StatusChangeEvent` with the `status` property being `PENDING` When false, no events are emitted.

    - ##### `Optional` emitEvent?: boolean

    - ##### `Optional` onlySelf?: boolean

  #### Returns void

  #### See

  AbstractControl.status

  Implementation of AbstractControl.markAsPending

  Inherited from UntypedFormArray.markAsPending

  - Defined in node_modules/@angular/forms/index.d.ts:475

### markAsPristine

- markAsPristine(opts?): void

- Marks the control as `pristine`.

  If the control has any children, marks all children as `pristine`, and recalculates the `pristine` status of all parent controls.

  #### Parameters

  - `Optional` opts: OnlySelf

    Configuration options that determine how the control emits events after marking is applied.

    - `onlySelf`: When true, mark only this control. When false or not supplied, marks all direct ancestors. Default is false.
    - `emitEvent`: When true or not supplied (the default), the `events` observable emits a `PristineChangeEvent` with the `pristine` property being `true`. When false, no events are emitted.

  #### Returns void

  #### See

  - ()
  - ()
  - ()

  Implementation of AbstractControl.markAsPristine

  Overrides UntypedFormArray.markAsPristine

  - Defined in packages/angular/forms/src/lib/form-array.ts:349

### markAsTouched

- markAsTouched(opts?): void

- Marks the control as `touched`. A control is touched by focus and blur events that do not change the value.

  #### Parameters

  - `Optional` opts: OnlySelf

    Configuration options that determine how the control propagates changes and emits events after marking is applied.

    - `onlySelf`: When true, mark only this control. When false or not supplied, marks all direct ancestors. Default is false.
    - `emitEvent`: When true or not supplied (the default), the `events` observable emits a `TouchedChangeEvent` with the `touched` property being `true`. When false, no events are emitted.

  #### Returns void

  #### See

  - ()
  - ()
  - ()

  Implementation of AbstractControl.markAsTouched

  Overrides UntypedFormArray.markAsTouched

  - Defined in packages/angular/forms/src/lib/form-array.ts:339

### markAsUntouched

- markAsUntouched(opts?): void

- Marks the control as `untouched`.

  If the control has any children, also marks all children as `untouched` and recalculates the `touched` status of all parent controls.

  #### Parameters

  - `Optional` opts: OnlySelf

    Configuration options that determine how the control propagates changes and emits events after the marking is applied.

    - `onlySelf`: When true, mark only this control. When false or not supplied, marks all direct ancestors. Default is false.
    - `emitEvent`: When true or not supplied (the default), the `events` observable emits a `TouchedChangeEvent` with the `touched` property being `false`. When false, no events are emitted.

  #### Returns void

  #### See

  - ()
  - ()
  - ()

  Implementation of AbstractControl.markAsUntouched

  Overrides UntypedFormArray.markAsUntouched

  - Defined in packages/angular/forms/src/lib/form-array.ts:344

### mergeAsyncValidators

- mergeAsyncValidators(validators): void

- #### Parameters

  - validators: AsyncValidator

  #### Returns void

  - Defined in packages/angular/forms/src/lib/form-array.ts:210

### mergeValidators

- mergeValidators(validators): void

- #### Parameters

  - validators: Validator

  #### Returns void

  - Defined in packages/angular/forms/src/lib/form-array.ts:206

### patchValue

- patchValue(valueOrObservable, options?): void | Subscription

- Patches the value of the control. Abstract method (implemented in sub-classes).

  #### Parameters

  - valueOrObservable: any
  - `Optional` options: ControlEventOptions

  #### Returns void | Subscription

  Implementation of AbstractControl.patchValue

  Overrides UntypedFormArray.patchValue

  - Defined in packages/angular/forms/src/lib/form-array.ts:289

### push

- push(control, options?): void

- #### Parameters

  - control: AbstractControl<T>
  - `Optional` options: ControlEventOptions

  #### Returns void

  Overrides UntypedFormArray.push

  - Defined in packages/angular/forms/src/lib/form-array.ts:321

### removeAsyncValidators

- removeAsyncValidators(validators): void

- Remove an asynchronous validator from this control, without affecting other validators. Validators are compared by function reference; you must pass a reference to the exact same validator function as the one that was originally set. If a provided validator is not found, it is ignored.

  When you add or remove a validator at run time, you must call `updateValueAndValidity()` for the new validation to take effect.

  #### Parameters

  - validators: AsyncValidatorFn | AsyncValidatorFn[]

    The asynchronous validator or validators to remove.

  #### Returns void

  Implementation of AbstractControl.removeAsyncValidators

  Inherited from UntypedFormArray.removeAsyncValidators

  - Defined in node_modules/@angular/forms/index.d.ts:310

### removeAt

- removeAt(index): void

- #### Parameters

  - index: number

  #### Returns void

  Overrides UntypedFormArray.removeAt

  - Defined in packages/angular/forms/src/lib/form-array.ts:309

### removeValidators

- removeValidators(validators): void

- Remove a synchronous validator from this control, without affecting other validators. Validators are compared by function reference; you must pass a reference to the exact same validator function as the one that was originally set. If a provided validator is not found, it is ignored.

  #### Parameters

  - validators: ValidatorFn | ValidatorFn[]

    The validator or validators to remove.

  #### Returns void

  #### Usage Notes

  ### Reference to a ValidatorFn

      // Reference to the RequiredValidator
      const ctrl = new FormControl<string | null>('', Validators.required);
      ctrl.removeValidators(Validators.required);

      // Reference to anonymous function inside MinValidator
      const minValidator = Validators.min(3);
      const ctrl = new FormControl<string | null>('', minValidator);
      expect(ctrl.hasValidator(minValidator)).toEqual(true)
      expect(ctrl.hasValidator(Validators.min(3))).toEqual(false)

      ctrl.removeValidators(minValidator);

  When you add or remove a validator at run time, you must call `updateValueAndValidity()` for the new validation to take effect.

  Implementation of AbstractControl.removeValidators

  Inherited from UntypedFormArray.removeValidators

  - Defined in node_modules/@angular/forms/index.d.ts:298

### reset

- reset(value?, options?): void

- Resets the control. Abstract method (implemented in sub-classes).

  #### Parameters

  - `Optional` value: T[]
  - `Optional` options: ControlEventOptions

  #### Returns void

  Implementation of AbstractControl.reset

  Overrides UntypedFormArray.reset

  - Defined in packages/angular/forms/src/lib/form-array.ts:359

### select

- select<R>(mapFn): Observable<R>

- #### Type Parameters

  - R

  #### Parameters

  - mapFn: ((state) => R)
    - - (state): R

      - #### Parameters

        - state: T[]

        #### Returns R

  #### Returns Observable<R>

  - Defined in packages/angular/forms/src/lib/form-array.ts:141

### setAsyncValidators

- setAsyncValidators(newValidator, updateValueAndValidity?): void

- Sets the asynchronous validators that are active on this control. Calling this overwrites any existing asynchronous validators.

  When you add or remove a validator at run time, you must call `updateValueAndValidity()` for the new validation to take effect.

  If you want to add a new validator without affecting existing ones, consider using `addAsyncValidators()` method instead.

  #### Parameters

  - newValidator: AsyncValidator
  - updateValueAndValidity: boolean = true

  #### Returns void

  Implementation of AbstractControl.setAsyncValidators

  Overrides UntypedFormArray.setAsyncValidators

  - Defined in packages/angular/forms/src/lib/form-array.ts:373

### setControl

- setControl(index, control, options?): void

- #### Parameters

  - index: number
  - control: AbstractControl<T>
  - `Optional` options: ControlEventOptions

  #### Returns void

  Overrides UntypedFormArray.setControl

  - Defined in packages/angular/forms/src/lib/form-array.ts:332

### setDisable

- setDisable(disable?, opts?): void

- #### Parameters

  - disable: boolean = true
  - `Optional` opts: ControlEventOptions

  #### Returns void

  - Defined in packages/angular/forms/src/lib/form-array.ts:328

### setEnable

- setEnable(enable?, opts?): void

- #### Parameters

  - enable: boolean = true
  - `Optional` opts: ControlEventOptions

  #### Returns void

  - Defined in packages/angular/forms/src/lib/form-array.ts:317

### setErrors

- setErrors(errors, opts?): void

- Sets errors on a form control when running validations manually, rather than automatically.

  Calling `setErrors` also updates the validity of the parent control.

  #### Parameters

  - errors: Partial<E>
  - opts: EmitEvent = {}

    Configuration options that determine how the control propagates changes and emits events after the control errors are set.

    - `emitEvent`: When true or not supplied (the default), the `statusChanges` observable emits an event after the errors are set.

  #### Returns void

  #### Usage Notes

  ### Manually set the errors for a control

      const login = new FormControl('someLogin');
      login.setErrors({
        notUnique: true
      });

      expect(login.valid).toEqual(false);
      expect(login.errors).toEqual({ notUnique: true });

      login.setValue('someOtherLogin');

      expect(login.valid).toEqual(true);

  Implementation of AbstractControl.setErrors

  Overrides UntypedFormArray.setErrors

  - Defined in packages/angular/forms/src/lib/form-array.ts:387

### setParent

- setParent(parent): void

- Sets the parent of the control

  #### Parameters

  - parent: FormGroup<any> | FormArray<any>

    The new parent.

  #### Returns void

  Implementation of AbstractControl.setParent

  Inherited from UntypedFormArray.setParent

  - Defined in node_modules/@angular/forms/index.d.ts:528

### setValidators

- setValidators(newValidator, updateValueAndValidity?): void

- Sets the synchronous validators that are active on this control. Calling this overwrites any existing synchronous validators.

  When you add or remove a validator at run time, you must call `updateValueAndValidity()` for the new validation to take effect.

  If you want to add a new validator without affecting existing ones, consider using `addValidators()` method instead.

  #### Parameters

  - newValidator: Validator
  - updateValueAndValidity: boolean = true

  #### Returns void

  Implementation of AbstractControl.setValidators

  Overrides UntypedFormArray.setValidators

  - Defined in packages/angular/forms/src/lib/form-array.ts:363

### setValue

- setValue(valueOrObservable, options?): void | Subscription

- Sets the value of the control. Abstract method (implemented in sub-classes).

  #### Parameters

  - valueOrObservable: T[] | Observable<T[]>
  - `Optional` options: ControlEventOptions

  #### Returns void | Subscription

  Implementation of AbstractControl.setValue

  Overrides UntypedFormArray.setValue

  - Defined in packages/angular/forms/src/lib/form-array.ts:226

### updateValueAndValidity

- updateValueAndValidity(opts?): void

- Recalculates the value and validation status of the control.

  By default, it also updates the value and validity of its ancestors.

  #### Parameters

  - `Optional` opts: {
    emitEvent?: boolean;
    onlySelf?: boolean;
    }

    Configuration options determine how the control propagates changes and emits events after updates and validity checks are applied.

    - `onlySelf`: When true, only update this control. When false or not supplied, update all direct ancestors. Default is false.
    - `emitEvent`: When true or not supplied (the default), the `statusChanges`, `valueChanges` and `events` observables emit events with the latest status and value when the control is updated. When false, no events are emitted.

    - ##### `Optional` emitEvent?: boolean

    - ##### `Optional` onlySelf?: boolean

  #### Returns void

  Implementation of AbstractControl.updateValueAndValidity

  Inherited from UntypedFormArray.updateValueAndValidity

  - Defined in node_modules/@angular/forms/index.d.ts:560

### validateOn

- validateOn(observableValidation): Subscription

- #### Parameters

  - observableValidation: Observable<object>

  #### Returns Subscription

  - Defined in packages/angular/forms/src/lib/form-array.ts:244