Cookies concent notice

This site uses cookies from Google to deliver its services and to analyze traffic.
Learn more
Skip to main content
This site is no longer updated.Head to Angular.devHome
/

This is the archived documentation for Angular v17. Please visit angular.dev to see this page for the current version of Angular.

FormControlOptions

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 Use nonNullable instead.