W3cubDocs

/Angular

FormControlOptions

interface

Interface for options provided to a FormControl.

See more...

interface FormControlOptions extends AbstractControlOptions {
  nonNullable?: boolean
  initialValueIsDefault?: boolean

  // inherited from forms/AbstractControlOptions
  validators?: ValidatorFn | ValidatorFn[] | null
  asyncValidators?: AsyncValidatorFn | AsyncValidatorFn[] | null
  updateOn?: 'change' | 'blur' | 'submit'
}

Description

This interface extends all options from AbstractControlOptions, plus some options unique to FormControl.

Properties

Property Description
nonNullable?: boolean

Whether to use the initial value used to construct the FormControl as its default value as well. If this option is false or not provided, the default value of a FormControl is null. When a FormControl is reset without an explicit value, its value reverts to its default value.

initialValueIsDefault?: boolean Deprecated

Deprecated Use nonNullable instead.

© 2010–2023 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/api/forms/FormControlOptions