# Interface AbstractControl<T>

interface AbstractControl<T = any> {
controlId?: string;
errors: null | ValidationErrors;
events: Observable<ControlEvent<any>>;
fullControlPath?: string;
readonly?: boolean;
rxapFormDefinition?: FormDefinition<any, any, any>;
stateChanges?: Subject<any>;
statusChanges: Observable<FormControlStatus>;
value: T;
valueChanges: Observable<any>;
get asyncValidator(): null | AsyncValidatorFn;
set asyncValidator(asyncValidatorFn: null | AsyncValidatorFn): void;
get dirty(): boolean;
get disabled(): boolean;
get enabled(): boolean;
get invalid(): boolean;
get parent(): null | FormGroup<any> | FormArray<any>;
get pending(): boolean;
get pristine(): boolean;
set pristine(value: boolean): void;
get root(): AbstractControl;
get status(): FormControlStatus;
set status(value: FormControlStatus): void;
get touched(): boolean;
set touched(value: boolean): void;
get untouched(): boolean;
get updateOn(): FormHooks;
get valid(): boolean;
get validator(): null | ValidatorFn;
set validator(validatorFn: null | ValidatorFn): void;
addAsyncValidators(validators: AsyncValidatorFn | AsyncValidatorFn[]): void;
addValidators(validators: ValidatorFn | ValidatorFn[]): void;
clearAsyncValidators(): void;
clearValidators(): void;
disable(opts?: { emitEvent?: boolean; onlySelf?: boolean }): void;
enable(opts?: { emitEvent?: boolean; onlySelf?: boolean }): void;
get<P extends string | readonly (string | number)[]>(
path: P,
): null | AbstractControl<ɵGetProperty<any, P>, ɵGetProperty<any, P>>;
get<P extends string | (string | number)[]>(
path: P,
): null | AbstractControl<ɵGetProperty<any, P>, ɵGetProperty<any, P>>;
getError(errorCode: string, path?: string | (string | number)[]): any;
getRawValue(): any;
hasAsyncValidator(validator: AsyncValidatorFn): boolean;
hasError(errorCode: string, path?: string | (string | number)[]): boolean;
hasValidator(validator: ValidatorFn): boolean;
markAllAsTouched(opts?: { emitEvent?: boolean }): void;
markAsDirty(opts?: { emitEvent?: boolean; onlySelf?: boolean }): void;
markAsPending(opts?: { emitEvent?: boolean; onlySelf?: boolean }): void;
markAsPristine(opts?: { emitEvent?: boolean; onlySelf?: boolean }): void;
markAsTouched(opts?: { emitEvent?: boolean; onlySelf?: boolean }): void;
markAsUntouched(opts?: { emitEvent?: boolean; onlySelf?: boolean }): void;
patchValue(value: any, options?: Object): void;
removeAsyncValidators(
validators: AsyncValidatorFn | AsyncValidatorFn[],
): void;
removeValidators(validators: ValidatorFn | ValidatorFn[]): void;
reset(value?: any, options?: Object): void;
setAsyncValidators(
validators: null | AsyncValidatorFn | AsyncValidatorFn[],
): void;
setErrors(
errors: null | ValidationErrors,
opts?: { emitEvent?: boolean },
): void;
setParent(parent: null | FormGroup<any> | FormArray<any>): void;
setValidators(validators: null | ValidatorFn | ValidatorFn[]): void;
setValue(value: any, options?: Object): void;
updateValueAndValidity(
opts?: { emitEvent?: boolean; onlySelf?: boolean },
): void;
}

#### Type Parameters

- T = any

#### Hierarchy

- AbstractControl
  - AbstractControl

#### Implemented by

- RxapFormArray

- Defined in packages/angular/forms/src/lib/types.ts:70

#####
Index

### Properties

controlId?
errors
events
fullControlPath?
readonly?
rxapFormDefinition?
stateChanges?
statusChanges
value
valueChanges

### Accessors

asyncValidator
dirty
disabled
enabled
invalid
parent
pending
pristine
root
status
touched
untouched
updateOn
valid
validator

### Methods

addAsyncValidators
addValidators
clearAsyncValidators
clearValidators
disable
enable
get
getError
getRawValue
hasAsyncValidator
hasError
hasValidator
markAllAsTouched
markAsDirty
markAsPending
markAsPristine
markAsTouched
markAsUntouched
patchValue
removeAsyncValidators
removeValidators
reset
setAsyncValidators
setErrors
setParent
setValidators
setValue
updateValueAndValidity

##
Properties

### `Optional` controlId

controlId?: string

- Defined in packages/angular/forms/src/lib/types.ts:72

### `Readonly` errors

errors: null | ValidationErrors

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

Inherited from NgAbstractControl.errors

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

### `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.

Inherited from NgAbstractControl.events

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

### `Optional` fullControlPath

fullControlPath?: string

- Defined in packages/angular/forms/src/lib/types.ts:73

### `Optional` readonly

readonly?: boolean

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

### `Optional` rxapFormDefinition

rxapFormDefinition?: FormDefinition<any, any, any>

- Defined in packages/angular/forms/src/lib/types.ts:74

### `Optional` stateChanges

stateChanges?: Subject<any>

- Defined in packages/angular/forms/src/lib/types.ts:76

### `Readonly` statusChanges

statusChanges: Observable<FormControlStatus>

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

#### See

- FormControlStatus
- AbstractControl.status

Inherited from NgAbstractControl.statusChanges

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

### value

value: T

The current value of the control.

- For a `FormControl`, the current value.
- For an enabled `FormGroup`, the values of enabled controls as an object with a key-value pair for each member of the group.
- For a disabled `FormGroup`, the values of all controls as an object with a key-value pair for each member of the group.
- For a `FormArray`, the values of enabled controls as an array.

Overrides NgAbstractControl.value

- Defined in packages/angular/forms/src/lib/types.ts:71

### `Readonly` valueChanges

valueChanges: Observable<any>

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.

Inherited from NgAbstractControl.valueChanges

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

##
Accessors

### asyncValidator

- get asyncValidator(): null | 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 null | AsyncValidatorFn

  Inherited from NgAbstractControl.asyncValidator

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

  #### Parameters

  - asyncValidatorFn: null | AsyncValidatorFn

  #### Returns void

  Inherited from NgAbstractControl.asyncValidator

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

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

  Inherited from NgAbstractControl.dirty

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

### 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

  Inherited from NgAbstractControl.disabled

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

### 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

  Inherited from NgAbstractControl.enabled

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

### 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

  Inherited from NgAbstractControl.invalid

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

### parent

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

  The parent control.

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

  Inherited from NgAbstractControl.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

  Inherited from NgAbstractControl.pending

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

### pristine

- get pristine(): boolean

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

  #### Returns boolean

  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.

  Inherited from NgAbstractControl.pristine

  - Defined in node_modules/@angular/forms/index.d.ts:157
- set pristine(value: boolean): void

  #### Parameters

  - value: boolean

  #### Returns void

  Inherited from NgAbstractControl.pristine

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

### root

- get root(): AbstractControl

  Retrieves the top-level ancestor of this control.

  #### Returns AbstractControl

  Inherited from NgAbstractControl.root

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

### status

- get status(): FormControlStatus

  The validation status of the control.

  #### Returns FormControlStatus

  #### See

  FormControlStatus

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

  Inherited from NgAbstractControl.status

  - Defined in node_modules/@angular/forms/index.d.ts:93
- set status(value: FormControlStatus): void

  #### Parameters

  - value: FormControlStatus

  #### Returns void

  Inherited from NgAbstractControl.status

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

### touched

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

  #### Returns boolean

  Inherited from NgAbstractControl.touched

  - Defined in node_modules/@angular/forms/index.d.ts:174
- set touched(value: boolean): void

  #### Parameters

  - value: boolean

  #### Returns void

  Inherited from NgAbstractControl.touched

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

### 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

  Inherited from NgAbstractControl.untouched

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

### 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

  Inherited from NgAbstractControl.updateOn

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

### 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

  Inherited from NgAbstractControl.valid

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

### validator

- get validator(): null | 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 null | ValidatorFn

  Inherited from NgAbstractControl.validator

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

  #### Parameters

  - validatorFn: null | ValidatorFn

  #### Returns void

  Inherited from NgAbstractControl.validator

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

##
Methods

### addAsyncValidators

- addAsyncValidators(validators: AsyncValidatorFn | AsyncValidatorFn[]): 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

  Inherited from NgAbstractControl.addAsyncValidators

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

### addValidators

- addValidators(validators: ValidatorFn | ValidatorFn[]): 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

  Inherited from NgAbstractControl.addValidators

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

### 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

  Inherited from NgAbstractControl.clearAsyncValidators

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

### 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

  Inherited from NgAbstractControl.clearValidators

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

### disable

- disable(opts?: { emitEvent?: boolean; onlySelf?: boolean }): 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.

  #### Returns void

  #### See

  AbstractControl.status

  Inherited from NgAbstractControl.disable

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

### enable

- enable(opts?: { emitEvent?: boolean; onlySelf?: boolean }): 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.

  #### Returns void

  #### See

  AbstractControl.status

  Inherited from NgAbstractControl.enable

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

### get

- get<P extends string | readonly (string | number)[]>(
  path: P,
  ): null | 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 null | AbstractControl<ɵGetProperty<any, P>, ɵGetProperty<any, P>>

  Inherited from NgAbstractControl.get

  - Defined in node_modules/@angular/forms/index.d.ts:606
- get<P extends string | (string | number)[]>(
  path: P,
  ): null | 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 null | AbstractControl<ɵGetProperty<any, P>, ɵGetProperty<any, P>>

  Inherited from NgAbstractControl.get

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

### getError

- getError(errorCode: string, path?: string | (string | number)[]): any

  #### Parameters

  - errorCode: string

    The code of the error to check

  - `Optional` path: string | (string | number)[]

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

  #### Returns any

  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'`

  Inherited from NgAbstractControl.getError

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

### getRawValue

- getRawValue(): any

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

  #### Returns any

  Inherited from NgAbstractControl.getRawValue

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

### hasAsyncValidator

- hasAsyncValidator(validator: AsyncValidatorFn): 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.

  Inherited from NgAbstractControl.hasAsyncValidator

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

### hasError

- hasError(errorCode: string, path?: string | (string | number)[]): boolean

  #### Parameters

  - errorCode: string

    The code of the error to check

  - `Optional` path: string | (string | number)[]

    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.

  Inherited from NgAbstractControl.hasError

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

### hasValidator

- hasValidator(validator: ValidatorFn): 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)

  Inherited from NgAbstractControl.hasValidator

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

### markAllAsTouched

- markAllAsTouched(opts?: { emitEvent?: boolean }): 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.

  #### Returns void

  #### See

  ()

  Inherited from NgAbstractControl.markAllAsTouched

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

### markAsDirty

- markAsDirty(opts?: { emitEvent?: boolean; onlySelf?: boolean }): 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: { 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 `events` observable emits a `PristineChangeEvent` with the `pristine` property being `false`. When false, no events are emitted.

  #### Returns void

  #### See

  - ()
  - ()
  - ()

  Inherited from NgAbstractControl.markAsDirty

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

### markAsPending

- markAsPending(opts?: { emitEvent?: boolean; onlySelf?: boolean }): 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.

  #### Returns void

  #### See

  AbstractControl.status

  Inherited from NgAbstractControl.markAsPending

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

### markAsPristine

- markAsPristine(opts?: { emitEvent?: boolean; onlySelf?: boolean }): 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: { emitEvent?: boolean; onlySelf?: boolean }

    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

  - ()
  - ()
  - ()

  Inherited from NgAbstractControl.markAsPristine

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

### markAsTouched

- markAsTouched(opts?: { emitEvent?: boolean; onlySelf?: boolean }): void

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

  #### 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 `events` observable emits a `TouchedChangeEvent` with the `touched` property being `true`. When false, no events are emitted.

  #### Returns void

  #### See

  - ()
  - ()
  - ()

  Inherited from NgAbstractControl.markAsTouched

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

### markAsUntouched

- markAsUntouched(opts?: { emitEvent?: boolean; onlySelf?: boolean }): 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: { emitEvent?: boolean; onlySelf?: boolean }

    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

  - ()
  - ()
  - ()

  Inherited from NgAbstractControl.markAsUntouched

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

### `Abstract` patchValue

- patchValue(value: any, options?: Object): void

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

  #### Parameters

  - value: any
  - `Optional` options: Object

  #### Returns void

  Inherited from NgAbstractControl.patchValue

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

### removeAsyncValidators

- removeAsyncValidators(validators: AsyncValidatorFn | AsyncValidatorFn[]): 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

  Inherited from NgAbstractControl.removeAsyncValidators

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

### removeValidators

- removeValidators(validators: ValidatorFn | ValidatorFn[]): 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.

  Inherited from NgAbstractControl.removeValidators

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

### `Abstract` reset

- reset(value?: any, options?: Object): void

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

  #### Parameters

  - `Optional` value: any
  - `Optional` options: Object

  #### Returns void

  Inherited from NgAbstractControl.reset

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

### setAsyncValidators

- setAsyncValidators(
  validators: null | AsyncValidatorFn | AsyncValidatorFn[],
  ): 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

  - validators: null | AsyncValidatorFn | AsyncValidatorFn[]

  #### Returns void

  Inherited from NgAbstractControl.setAsyncValidators

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

### setErrors

- setErrors(errors: null | ValidationErrors, opts?: { emitEvent?: boolean }): 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: null | ValidationErrors
  - `Optional` opts: { emitEvent?: boolean }

    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);

  Inherited from NgAbstractControl.setErrors

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

### setParent

- setParent(parent: null | FormGroup<any> | FormArray<any>): void

  Sets the parent of the control

  #### Parameters

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

    The new parent.

  #### Returns void

  Inherited from NgAbstractControl.setParent

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

### setValidators

- setValidators(validators: null | ValidatorFn | ValidatorFn[]): 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

  - validators: null | ValidatorFn | ValidatorFn[]

  #### Returns void

  Inherited from NgAbstractControl.setValidators

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

### `Abstract` setValue

- setValue(value: any, options?: Object): void

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

  #### Parameters

  - value: any
  - `Optional` options: Object

  #### Returns void

  Inherited from NgAbstractControl.setValue

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

### updateValueAndValidity

- updateValueAndValidity(opts?: { emitEvent?: boolean; onlySelf?: boolean }): 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.

  #### Returns void

  Inherited from NgAbstractControl.updateValueAndValidity

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